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

How to check a certain players name?

game.Players.Name = "NinjoOnline"

This dosent work. How can I make a script check to see someones name.

2 answers

✓ Accepted answer

Hey. This method here relies on knowing what you're checking for, so yeah.

if object.Name == "Playername" then --This does the checking part. Note that
										--you need to know
										--what you're searching for, in which
										--case you already know
										--the player's name.
	--Put your goodies in here.
end --This just ends the if statement. :P

I hope you enjoy!

Its not gona be one line so. if you wana check i recommend if. if your doing commands, this goes inside

if speaker.name="NinjoOnline"
       --TO-DO put code here
else
        msg=Instance.new("Message", game.Workspace)
        msg.Text="Sorry "+speaker.name+" You are not a admin"
        msg.Parent=game.Workspace
        wait(5)
        msg:remove()
end

this code is inside the command, speaker.name is a nice variable that you dont need to create, hope you enjoy your commands!

1 comment

0

You know why i got downvotes? abusers, thats what

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