is there a way to sat who clicked a click detector? does it work like this :
ClickDetector.MouseClick:Connect(function(plr)
is there a way to sat who clicked a click detector? does it work like this :
ClickDetector.MouseClick:Connect(function(plr)
i am pretty sure the ClickDetector already passes the player argument when it is clicked, so if you were to do something like this:
ClickDetector.MouseClick:Connect(function(plr)
print(plr.Name) --- the players name should print
end)
i just tried it , plr is plr.Name
Yes, player is a valid parameter. It will give you the player that clicked the ClickDetector. I assume that’s what you were asking for. ![]()
However, if you mean to get the player’s name, you would have to do something similar to:
local pName = player.Name -- gives you the player's name
Are you saying plr and plr.Name return the same thing?(i’m not sure what you mean), plr is the actual player( as an instance) and plr.Name gives you the Name of the player
Just gunna back this up: They do not return the same thing.
As stated, player in this case is the player found ingame.players.
Player.name is the name of the player found in game.players