I don't have a script because the question regards where I should start off from scripting a character creation system.
RPGs have the ability to have custom characters based on races, etc. I was mainly interested on how I could make it so my custom characters will be loaded for the players based on their selection. How would I go about this?
StarterCharacter will be for all players sadly so that's not a solution.
Note: This is not about getting the script. I'm simply looking for the concept so I can script it myself.
Really, all you need is some variables, a GUI, and (if you want to save their appearance), DataStore.
Here's a really basic example:
local player = game.Players.LocalPlayer local avatar = player.Character or player.CharacterAdded:wait() local skinColor = 1 local nextButton = --// Path to a GUI button. nextButton.MouseButton1Click:connect(function() skinColor = (skinColor<5) and skinColor+1 or 1 --// A ternary operator; if the skin color is less than the max, add 1. Otherwise, set it to 1. end)
Of course, this is a very basic example; you'd need much more to complete a character creation. But this is how you would go about creating it. Hope this helped.
EDIT: Forgot to add in how to apply those to the character. Assuming the variables from the above script exist:
local skins = { 'Really red', 'Really black', 'Pastel brown', 'Pastel orange', 'Reddish brown' } for _, v in pairs(avatar) do if v:IsA('Part') then v.BrickColor = BrickColor3.new(skins[skinColor]) end end
Well you can begin by first taking away everything the Player may enter into the game with (i.e. clothes, meshes, hats, etc.). Once you take into account everything they may have, you should then start giving them what you will allow in your game to customize. Maybe your game only allows shirts so you take away everything and give them Shirts, and so on. Here are the objects you have to look out for:
<Instance> Shirt (found in character model) <Instance> Pants (found in character model) <Instance>Decal (This one is the face, named "face", which can be found on a character's "Head") <Instance> CharacterMesh (found in character model) <Instance> Hat (found in character model) <Instance> Mesh (found in character's "Head"
Knowing all of this, you can figure out what you want to do. Now, note that not always a player will be carrying all of this, so keep in mind that you should first check IF they have it and then remove or do as you will with it. Also remember that everytime a character resets that he will re-load all his gear so you must take it away again everytime he resets or his humanoid dies.
Hope I helped :D