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

How could I check a player's name once they enter the game?

I'm working on a ban script and I need to know how to do this so I can actually, get it to work.

1 answer

This should work to initially find the player's name.

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

4 comments

2

Why not just player.Name?

0

Ah, that is true. player.Character.Name is mostly useful if you use admin commands which use nicknames, however that usually isn't an issue.

0

Kind of confusing on how to get it to check if it matches a name in the bannedlist table, I have, which is what I wanted.

0

That would require us doing all of the scripting, which is asking for a request, so this is Not Constructive.

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