How to make many possible StarterCharacters?

You know how you can use a dummy named StarterCharacter in StarterPlayer to change the character you start out with. Is it possible to have many of these dummies in StarterPlayer and have a script to choose them randomly when you spawn? I hope this is clear.

1 Like

StarterCharacter can only have one model AFAIK. To do what you want, there are two ways to accomplish that.
If the body type doesnā€™t matter, then you can change the appearance from the script easily by destroying the old clothing, accessories and bodycolor objects and cloning in the ones you want.

However, if the models have different bodies from each other, then, then you need to put all the models in ServerStorage (probably in a folder if you want to be organized) and do

local CharacterModels = game.ServerStorage.CharacterModels:GetChildren() -- Assuming you have them in a folder called CharacterModels
local CharacterModel = CharacterModels[math.random(1, #CharacterModels + 1)]:Clone()
CharacterModel.Parent = game.Workspace
CharacterModel.HumanoidRootPart:SetNetworkOwner(Player) -- For animations and physics to replicate 
Player.Character = CharacterModel

This is, of course, just the logic of what to do. Exact code depends on how you structure your gameā€™s spawn system. OnPlayerAdded should do that, and also either CharacterAdded (when the player respawns) or Humanoid.Died (when the player dies).

It is giving me an error saying: Network Ownership API cannot be called on Anchored parts or parts welded to Anchored parts.

The characters I am using have helmets anchored to their heads, so it gives me this error. What do I do?

When I said ā€œAnchoredā€ I meant to say ā€œweldedā€. Sometimes I type the wrong thing.

I cant un-anchor faces and meshes, does that matter?

Iā€™m sorry I hope Iā€™m not bugging you, another error appeared: [Workspace.Script:5: attempt to index global ā€˜Playerā€™ (a nil value)]

If there is still another problem, Iā€™ll just leave it alone. Thank you for your help!

Okay so I have many different looking models, I would have to put this in server storage? Also where do I put the script and what type is it? (script/local script)

1 Like