Hello, I was wondering how to change a player’s name with a script.
Not the humanoid display name, but the name.
If It’s not possible to change player.Name, I just need that the name displays on the Humanoid Display Name, and in the chat name. I’m using legacychatservice.
If I try to change the player.Name from a script, it shows me an error.
Thanks!
player.Name is a read parallel meaning you can’t change it. You’ll have to do it through Humanoid or some other method. Even though in documentation it says it’s inherited thru Instance class you cant change a players username or display name.
in that case you could just either have a stringValue instance or script instance assigned to each player when joining the game thru serverscripts and have humanoids reference that. whether its actually scoped in the player or in serverstorage is up to you, but that’s one method I see of doing it. You can carry this variable thru dataStores too if you want to set it up through serverStorage.
You can’t change the players name directly, but you can make it appear changed. With TextChatService, you can change the prefix of the message, which includes the player’s display name.
You would need to modify LegacyChatService modules to make this work, and I don’t think you want to do that.