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

How do I identify a player in a normal script?

I know that in functions you can identify players by doing:-

function name(player)

well depending on what you want the function's event to be but I want to know how to identify a player in a normal script by normal script I mean not local script or module script but just Script there are 3 types Module, Local and Script I just want Script not Local or Module Script so please I would appreciate it if someone helped me understand how to identify a player in a normal script by the player ofcourse I dont mean character I mean the player in the Players section the specific player.....

3 comments

0

Btw this would work just fine in a normal script.

1

Which player is the one that you are interested in? Why that particular player? -- That's the key

0

Haha I like that long-winded paragraph. it's funny. Anyways, there are many methods for getting a player in a server Script, but they depend on what you're trying to do. e.g. "The player that did what?"

1 answer

✓ Accepted answer

Use PlayerAdded Event.

This way everytime a player joins it prints his name in the output. You could make a player join gui if so.

something like label.Text = player.Name

game.Players.PlayerAdded:connect(function(player)
print(player.Name)
end)

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