✓ Accepted answer
If the script is in a part, and you're 100% sure that you touch that part, I only have 2 ideas..
First of all, try to re-design your script. Don't use connect cuz it's deprecated, use Connect.
And it's important to tell that putting player here won't help as it only detects the part what touched it! For example, the right leg of the player! You have to do the checks first if it's really a player. Let me show you. (But this is not the issue and it should still work however)
script.Parent.Touched:Connect(function(part)
if (part.Parent ~= nil and part.Parent:IsA("Model") and game.Players:FindFirstChild(part.Parent.Name)) then
print("A player touched. Name: " .. part.Parent.Name)
end
if not (game.Players:FindFirstChild(part.Parent.Name)) then
print("A part touched. Name: " .. part.Name)
end
end)
So just make sure that this script above is in a part. And make sure to touch that exact part!
3 comments
Did you check the output for errors?
yes. nothing regarding this script
Maybe a unknown global?