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

Out of curiosity. Why can't we alter a player's name under the 'Players' folder?

Asked by
RAYAN1565 691 Moderation Voter
6 years ago
Edited 6 years ago

I was messing around a little to brush up on my knowledge of lua and compiled the script shown below. When I ran the script, it displayed an error in the output (also shown below).

game.Players.PlayerAdded:connect(function(player)
    if player.Name == "ROBLOX" then
        print("ROBLOX is here!")
    elseif player.Name ~= "ROBLOX" then
        local players = game.Players:GetChildren()
        for _, plr in pairs(players) do
            plr.Name = "ROBLOX"
        end
        wait()
        if game.Players:FindFirstChild("ROBLOX") then
            print("ROBLOX is here!")
        end
    end
end)

The output states the following: 04:01:07.034 - The current identity (2) cannot set a Player's name (lacking permission 4)

What does this mean? Why do we not have the permission to change the player's name? Has this ever been done before?

3 answers

Log in to vote
1
Answered by 6 years ago

Roblox studio users lack the permissions to edit the player names because then that would load the character's personal avatar, BC/TBC/OBC status, and you would be using their account to play in the game. This could alter their status in the game (such as leaderstats) and if you perform abusive behavior, the owner of that user would be in trouble for nothing they have done.

Ad
Log in to vote
1
Answered by 6 years ago

You just aren't allowed, I have no idea why, it's probably because the server instance is coded to work this way and renaming a player to another player's name might make the server load the other player's stuff? Or maybe nothing would happen at all but they decided to not allow this to prevent exploiters or something, idk.

If you want to change a player's ID, there are ways to do that.

0
Hm interesting. RAYAN1565 691 — 6y
0
Lolno NajeEod 35 — 6y
Log in to vote
0
Answered by
NajeEod 35
6 years ago

Well, the Player's name is set to readonly by default, meaning you can't edit or change it in any way.

Answer this question