SpawnLocation Won't Destroy when a Part “Lava” Touches the SpawnLocation

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.

1 Like

Ok new behaviour has been seen with the printing being added.

  1. Only Prints SpawnLocation And SpawnLocation2
  2. It Prints all parts of a player when they die

image

Try also printing the part’s Classname as well. Can I see your explorer?

My Studio has froze one minute.

each tower is the same

1 Like

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?

1 Like

part.ClassName ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎

Oh yeah i just remembered that sorry

1 Like

Testing the class name print now


when i added the class name it shows this.

My computer won’t take a screenshot for some reason…

Those aren’t classnames… Can you show your code?

We fixed the bug. Thanks everyone!

1 Like

What was the issue?

character limit