Change player's name

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!

2 Likes

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.

1 Like

Yeah, I got it. I’m actually asking for a script that changes the player’s name in the chat. Like if it was the normal one.

i think that would have to do with chatservice then i have yet to dabble there but im sure theres something of that sort here

I’m using LegacyChatService, it means that I need to use the Chat Service with scripts for the LegacyChatService.

1 Like

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.