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 10 years ago
game.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 10 years ago

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!

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

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!

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