Models that were previously a character cannot be renamed

I’m writing a system where a player can walk up to a tank and become the tank, where the tank replaces their character. When the player wants to leave the tank, their original character is restored. The tank’s name cannot be changed anymore; it’s stuck as the player’s name because it used to be their character.

This can be reproduced in the command line:

local player = game.Players.LocalPlayer
local character = player.Character
player.Character = nil
character.Name = "test"

image

Have you tried setting Archivable on the model to true?

Archivable being false only prevents an object from being saved or cloned.

2 Likes

What’s context 4, again? CoreScripts? If you’re willing, edit some of the core scripts in studio (they’re in a special directory) and see if you can rename the model.

Why can’t we set a Character’s name in the first place anyway? Doesn’t make much sense.

2 Likes

My guess is characters have a lot of hardcoded spaghetti code.

4 Likes

The first thing that comes to mind is an archaic measure against exploiting, but that is just a guess.

Yeah, an exploiter could pretend to be Shedletsky, for example, to try to trick users, by changing their name and look using a script.

But this only limits it to a context level, most exploits give themselves the highest context level.

Ah, okay