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

I am trying to set a value to a players name when click I keep getting a error can anyone help?

Asked by 8 years ago
1local player = game.Players:GetPlayerFromCharacter()
2 
3 
4script.Parent.Union.ClickDetector.MouseClick:connect(function(click)
5    if script.Parent.Owner.Value == "" then
6        script.Parent.Owner.Value = game.Players:GetPlayerFromCharacter(click)
7    end
8end)

1 answer

Log in to vote
0
Answered by 8 years ago

You can't get the player who clicked from a part.

0
where can I get it from? zansummer 3 — 8y
Ad

Answer this question