Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I get the name of the player who clicked a ClickDetector?

How do I get the name of a player who activated a ClickDetector? (in this context by player I mean the name of their character model in Workspace)

1 answer

✓ Accepted answer

whenever the ClickDetector.MouseClick() event fires, it passes the player object of the player that clicked it..

so all you have to do is:

clickDetector.MouseClick:Connect(function(player)
	print(player.Name, " clicked the button")
end)

1 comment

0

I agree!

This discussion is preserved as it was. New answers, comments, and votes are closed.