I was just wondering if there was a way to find out who clicked on the click detector?
COMMUNITY QUESTION
Who clicked the click detector?
1 answer
The correct way to see who clicked it:
local function onMouseClick(player)
print('player who clicked is ' .. player.Name)
end
clickDetector.MouseClick:connect(onMouseClick)
If you include player in the mouse click function, roblox automatically fills that in with the person (located in players) who clicked it.
This discussion is preserved as it was. New answers, comments, and votes are closed.
