Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

whenever I click a object with a clickdetector how do I found out who clicked it?

Asked by
Prioxis 673 Moderation Voter
10 years ago

I don't really know how to do this but I want to be able to click the item then it copies the players name into the items StringValue

I don't have a script yet because I don't know how to start really

1 answer

Log in to vote
0
Answered by
Shawnyg 4330 Trusted Badge of Merit Snack Break Moderation Voter Community Moderator
10 years ago

The variable 'plr' is the actual Player.

script.Parent.ClickDetector.MouseClick:connect(function(plr)
    print(plr.Name)
end)
0
You forgot: '.MouseClick' after 'ClickDetector' TofuBytes 500 — 10y
0
Ah, thank you. Shawnyg 4330 — 10y
Ad

Answer this question