Player Model That Is Cloned Has The Wrong Name

I have a script that if the player joins the script clones the player avatar to a model.
The problem I have that it doesn’t give it the right model name.
If the player joins it gives the players username to be the models name.
Can somebody help me have one name?
Here is the script:

local player = game:GetService("Players").LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
character.Archivable = true
local characterModel = character:Clone()
character.Archivable = false

characterModel.Name = character.Name.. " Clone"
characterModel.Parent = workspace


Can it have the name “Clone”?
Thank you if you help me

1 Like

try setting the name after you set the parent and if that does nothing maybe try add a wait

You shouldn’t clone the players character because there are many PlayerScripts that you don’t want in a clone.

Is your script a server or client script?

It’s a client script. Inside of workspace.

Put the client script in Starterplayer → StarterCharacterScripts

The name has now changed. It’s was just the username of the player now it’s [USERNAME] clone.

local player = game:GetService("Players").LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
character.Archivable = true
local characterModel = character:Clone()
character.Archivable = false

characterModel:WaitForChild("Humanoid").DisplayName = ""
characterModel.Name = character.Name.. " Clone"
characterModel.Parent = workspace

U need to make the DisplayName to nothing, because the DisplayName will showing instead the ModelName, if there is a Display Name.

now there are 2 models that have the names “[USERNAME]”
and the other one has the name “[USERNAME] Clone”
I want that it just has the name “Clone”

Then do characterModel.Name = "Clone", instead of characterModel.Name = character.Name.. " Clone"

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.