I’m trying to detect server-side if a part is touched. However, the touch event doesn’t seem to be firing. I’m not sure why.
local part = game.Workspace.Part
part.Touched:Connect(function(touchedPart)
print("touched")
end)
I’m trying to detect server-side if a part is touched. However, the touch event doesn’t seem to be firing. I’m not sure why.
local part = game.Workspace.Part
part.Touched:Connect(function(touchedPart)
print("touched")
end)
Scripts don’t run in ServerStorage (I believe). Put it in workspace or ServerScriptService.
Put the script in the Part, and make the part variable script.Parent
and it should work. The main reason the script isn’t working is because it’s in ServerStorage. Putting it in ServerScriptService will also help. Also make sure the Part’s CanTouch
value is set to true.
This is correct. Script will not run in ServerStorage.