Try adding a print statement to the function that prints the name of the part to make sure it’s recognizing anything in the first place, or try detecting the touch event from the spawn location instead
Ok Not trying to sound like an idiot but i’m confused
Add print(part.Name)
to the top of the touched event function or, alternatively, detect the touch from the spawn location instead of the lava to see if that works.
Testing now I’ll let you know the result.
According to the documentations, the Touched
event only fires as a result of physics movement. Which is why @0Tenth said the event won’t fire if you are updating the CFrame
property. One of the BaseParts
involved in the detection must be unanchored. You can try using a body mover object, like LinearVelocity
, to move the lava, too.
You can also use BasePart:GetTouchingParts()
on the “lava” part and destroy the SpawnLocations
found within that table. However, you would have to constantly check for SpawnLocations
, which could cause bad performance. So, I don’t recommend it.
Ok new behaviour has been seen with the printing being added.
- Only Prints SpawnLocation And SpawnLocation2
- It Prints all parts of a player when they die
Try also printing the part’s Classname as well. Can I see your explorer?
My Studio has froze one minute.
Alright, as stupid as it sounds, I wanted to make sure they were actually SpawnLocations. Our of curiosity, can you print the Classname of it as well?
How do you print class names of a part?
part.ClassName
Oh yeah i just remembered that sorry
Testing the class name print now
Those aren’t classnames… Can you show your code?
We fixed the bug. Thanks everyone!
What was the issue?
character limit