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

How to get the Source of a MouseClick?

If I had a function activate onClick with a click detector in a global script, is there a way to know who clicked on the part? (either player or character)

1 answer

✓ Accepted answer

The first parameter of the MouseClick event is the player who clicked it, so you could do:

clickDetector.MouseClick:Connect(function(plr)
	...
end)

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