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

how to find the player?

if there is an clickdectator in a brick and someone clicks that brick how would you find the person who clicked it.

1 answer

✓ Accepted answer

this is considering the script is inside the clickdetector, inside the part

scritpt.Parent.MouseClick:connect(function(playerWhoClicked)
	print(playerWhoClicked.Name)
end)

the param for mouseClick is the player who clicked.

6 comments

1

i did that but i added a playerwhoclicked.Parent so thats why it wasnt working

0

Why did you add parent?

1

no

0

i thought it was same as the touch function

0

so it would return what? the players torso? the Right leg? Hinest mistake though

0

Scritpts can be tricky

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