Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make blank startercharacter have player face, skin tone, clothing, hats, etc?

Asked by 2 years ago

I am using a blank startercharacter in my game to put parts and values into the player's character when they spawn, I got it by testing in studio and copying my roblox character, removing clothes and hats. But the problem is, when you go into the game, your character is not wearing the hats you have on your character. You also don't have any clothes, your face is the one i had on my character, and so is the skin tone. Can someone tell me how I can get the startercharacter to have the cosmetics your avatar has equipped?

picture of the character ingame and in the explorer

1 answer

Log in to vote
1
Answered by
CDXKIE 130
2 years ago

I'm not really understanding why you had to delete your hats and clothes and stuff in the first place, but the easiest method of doing this is instead to add all the values to the players character when they spawn in and delete the starter character.

Since you have a lot of values, I'd make a table for all of them.

local table = {
    {
        -- [[Things in each of the tables:
        Name: Name of the value
        Type: Type of the value (Bool value, number value...)
        Default: What the value is set to at first.
        ]]
        Name = "Beast Mode"
        Type = "BoolValue"
        Default = "false"
    },
    -- You get the idea...
}

local function CreateAllTheValues(char)
    for i, v in table do
        local value = Instance.new(v.Type)
        value.Name = v.Name
        value.Value = v.Default

        value.Parent = char
    end
end

game:GetService("Players").PlayerAdded:Connect(function(plr)
    plr.CharacterAdded:Connect(function(char)
        CreateAllTheValues(char)
    )
)

I have to go now, if there's any problems, try it yourself. This site is for asking about bugs, not just how to do something after all.

0
Alright, I took your advice and found a way to do things differently for the parts, thanks. Uniplier 83 — 2y
0
No problem, it's good you learned from what I told you instead of just copy pasting my code. :D CDXKIE 130 — 2y
Ad

Answer this question