Touched event not working

What is the ‘Touch’ object, is it basepart or some kind of other object?
Also if its located in workspace, dont try local script, because local scripts arent working in workspace.
Any errors?

Try doing repeat wait() until game:IsLoaded() at the first line

1 Like

Touch is a normal part.

Yes, I forgot about Local Scripts don’t work in workspace, and I already tried on players folders and worked (but I can’t use Local Script in what I’m trying to make)

and the line u said, for some reason, stopped all the script, like the game never loaded.

I tried a normal task.wait(60) to see if was about game load, but isn’t.

3 Likes

Where is the script located? It would be easier if you could provide us the hierarchy.

Place not loading is definitely not the issue, also game:IsLoaded() and game.Loaded do only work on LocalScripts.

2 Likes

The script is inside a model on workspace.

1 Like

Are there any errors in the console once you run the script?

1 Like

No, there are no errors, I tried put the scripts with more functions to see what happend and all functions inside script works but not the Touched event

1 Like

Can you show me what the model looks like inside of the explorer?

1 Like

Is a normal dummy model (I’m not on studio rn)

The Touch part is with a weld in Dummy Head

1 Like

What is the parent of the script?

1 Like

is the part cancollide off? cuz if it is turn on

1 Like

what is “touch”, a part inside a script is unusual and only parts, unions and meshparts have the touched property

1 Like

When you play in Studio test mode when you select the dummy’s head does it have CanTouch true?

1 Like

Seems to be working perfectly fine for me! Try using the .rblx file below, tell me if it’s working for you!

model thing lol.rbxm (3.2 KB)

1 Like

Yes, the CanTouch is enabled in testing

1 Like

touch part is inside a Dummy Model, welded in Head,the script is on Dummy Model
@Cbrrah

1 Like

It can’t be CanCollide on, but if I put on, is the same thing, it doesn’t work

1 Like

Would you mind sending a screenshot of your workspace?

1 Like

Keep in mind, ANYTHING touching the part will trigger the event. How do you know when it triggers?

Just incase, you could add TouchInterest to it.

script.Parent.Touch.Touched:Connect(function(hit)
    wait(1)
    print("touched by instance ".. hit.Name.. "!")
end)
1 Like
script.Parent.Touched:Connect(function()
print("1")
end)

or

script.Parent.Touched:Connect(function()
print(tostring(yourValue))
end)
1 Like

@Wolf1te @Tris_banana

It appears that isn’t working in a normal script, I solved that changing to local script and putting a remote event to work in the normal script

1 Like