Open NuggetXX2000 opened 11 months ago
Hey, I dont know if you still need this info. But After you initiate the object, you can add additional properties such as Name. Here's my example:
melon.Name = "mel" print(engine:GetBodyById(melon.id).Name)
You would call this AFTER you create an object through Engine:Create(), this is NOT something you type when you're creating the object, just right after
Hey, I dont know if you still need this info. But After you initiate the object, you can add additional properties such as Name. Here's my example:
melon.Name = "mel" print(engine:GetBodyById(melon.id).Name)
You would call this AFTER you create an object through Engine:Create(), this is NOT something you type when you're creating the object, just right after
Thanks! I have since put off the project but whenever I get the chance to, I will use this and let you know. Thanks again.
Description
What do you need help with/what is your query? Describe in 30-40 words or more!
When using .Touched, I am unable to get the name of the obj that has touched the rigidbody
example: sprite.Touched:Connect(function(id) objTouched = engine:GetBodyById(id) print(tostring( objTouched.Name )) -- Returns nil, I've tried many other ways but it returns a table value or just the id end)
So far I have
What have you tried so far? (Optional)
Searched online, searched nature2d forum
Lastly
Anything else you would like to share?
If this is an easy fix I'll feel stupid