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

How to check a certain players name? [closed]

Asked by 11 years ago
1game.Players.Name = "NinjoOnline"

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

Closed as Not Constructive by Articulating

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

2 answers

Log in to vote
1
Answered by 11 years ago

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

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

I hope you enjoy!

Ad
Log in to vote
0
Answered by
funzrey 58
11 years ago

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

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

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

0
You know why i got downvotes? abusers, thats what funzrey 58 — 11y