How do I make a custom character in a script?

			local charged = game.ServerStorage.Characters["Charged Creeper"]:Clone()
			charged.Name = player.Name
			player.Character = charged

			charged.Parent = workspace
			
			wait()
			
			char:Destroy()

That’s the code I have so far, but it bugs when I destroy their leftover character. If I don’t destroy it, it leaves their old character just sitting there.

1 Like

When you have created your own custom character you can just insert it into StarterPlayer as a Model and then when you test it out it will set everyone’s character to your custom made character.

2 Likes

I’m sorry, I made a new post about this, but this character has a rarity (math.random) so I can’t just do that

No, that is way off. When they respawn, I want them to morph

What if you try destoying the original character then set the new character

1 Like

wouldn’t that result in them respawning then immediately after they respawn? That wouldn’t look good

Maybe, I’m opening studio now; Gimme a minute.

EDIT: I don’t think so, because in my “prop hunt” test I set the parent of the original character to be a folder in RS and then clone the new item.

1 Like

wait so when do you destroy the character then? To stop a memory leak

Well sorry but I’m not the one to ask about memory issues, however, destroying the character before you change the char does work.

1 Like

No, like if you put it in RS, it would eventually stack characters and there’d be thousands

Oh, no. I made sure its only the original character, if it already exists (in the RS folder) then don’t add it, just destroy.

wait, so in my case I want to change their character when they respawn, or before the visual of them on the ground. So, what would I do in that case then?

You want it so whenever the character dies/respawns a random character gets loaded in, however, that random char cannot be the OG char?

1 Like

So, its this different character that is a bit bigger than the ones in StarterPlayer.

Alrighty, let me try somethings!

1 Like
			wait()

			local charged = game.ServerStorage.Characters["Charged Creeper"]:Clone()
			charged.Name = player.Name
			player.Character = charged

			charged.Parent = workspace
			
			wait()
			
			char:Destroy()

here’s the code I have so far, I added a wait() at the top of it, but didn’t test it yes

Edit: that’s in player.CharacterAdded() function

Okay, one more thing I need to know. Is it always the same model?

1 Like

yeah it the character in starter player stays the same, I just want that bigger one to spawn in once in a while