I Mean to like, creating a part and then if anyone has touched it I'm will be announcement like, "(Name of player) Has touched the part", I'm need this beacuse im wanna know who comes in... Please anyone help
✓ ANSWER ACCEPTED
How to make a part with player detector?
1 answer
✓ Accepted answer
Welp, I'll be willing to help with that.
Have a part in Workspace named "namecaller", then create a LocalScript in StarterGui like this:
local player = game.Players.LocalPlayer
while game.Workspace:FindFirstChild(player.Name) == nil do
wait()
end
wait(1)
player.Character.Humanoid.Touched:connect(function(part, part2)
if part.Name == "namecaller" then
print(part2.Parent.Name)
end
end)
It should work given that the name of the part doesn't have any spaces, capitalization, etc.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Read community guidelines