Touch event not firing

It’s in a server script sorry for any confusion. Yes it does give the full name its only the function not running

Can you try to setup a touched event for another type of spike?

1 Like

Oh alright, maybe try creating a normal basic part with this script and do the same .Touched function on it?
I’m trying to figure it out with you :joy:

1 Like

Same thing (extra characters asdjkhwau)

Now it prints with just a random part in the workspace

This seriously might be a bug?
Try to restart studio (silly but maybe?)

And try to create a new part in workspace and just give it:

workspace:WaitForChild(“Part”).Touched:Connect(function(hit)
    print(hit.Name, “Touched)
end)

I’ve got to go thanks for helping me at such a late hour. I just found out if i set the touch part to something that does not exist i do get an error

This is working with anything that is not the baseplate now

1 Like

Alright, yeah it was late haha.
Happy it worked after all, you can mark your own answer as a solution to close the topic automatically.

It stopped working again :confused: Ill try tomorrow

May I get a look at how the spike is formed? And what exactly is the base part in the physical world?

the red base is suppose to change to what ever color its on top of

The BasePart.Touched event will only fire if the touch is of physics. Tweening an object, which is changing the CFrame, will not trigger the event. This means that at least one of the objects has to be unanchored, as well. You can read about this on the documentations.

Okay that makes sense in that case would you know another way I could detect it?

I know that you can use BasePart:GetTouchingParts() to get a numeric array of other parts intersecting with a part.

You can use WorldRoot:GetPartsInPart().

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.