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

Why won't my change name script work?

Asked by 9 years ago

I'm trying to change my name so when i join the game my name won't be madman5533 anymore, it will be "HAX" , What is wrong with this current script? Is this even possible?

game.Players.madman5533.Name="HAX"

3 answers

Log in to vote
0
Answered by
iNicklas 215 Moderation Voter
9 years ago

Well because Players isnt located in workspace. Only the player model is located in workspace.

0
You have a good point QuantumScripter 48 — 9y
0
How about now? QuantumScripter 48 — 9y
0
Won't work since each player is not editable Gamenew09 180 — 9y
Ad
Log in to vote
0
Answered by 9 years ago

In order to do this, you need to check for the creator's id. If you're inside the game, then it will change your name. So, you need to use a for loop to check through all players and find if you're there.

while true do --while true do loop to keep checking
    for _,v in ipairs(game.Players:GetPlayers()) do --for loop, that checks through players
        if v.userId == game.CreatorId then --checks if v(all players) includes the creators id.
            v.Name = "HAX" --changes name to "HAX"
        end
    end
    wait(10)
end

Accept this answer and upvote me if this helped!

0
I would suggest to use a OnChildAdded event rather then looping the hole time its more efficient regardless the Players name is locked by roblox, its read only Voltoxus 248 — 9y
Log in to vote
0
Answered by
Voltoxus 248 Moderation Voter
9 years ago

You cannot change the name of a player its locked by roblox making it read only, but you could get around this by creating a custom leaderboard or just disabling the current one and then hiding your current characters name and replacing it with a billboard gui.

0
How would i do that? QuantumScripter 48 — 9y

Answer this question