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

a gui that changes skin color?

Asked by 6 years ago

ive been making this character creator gui, where you can change faces, beards, hairs, hair color and skin color. ive been making one for a while where you click the left button the GUI it lowers the value and the right button it increases it (this part of the script is fine). ive been trying to figure out how to actually change the players skin tone on a separate script as it isnt working for me. should i add a while true do or something? my friend told me it had something to do with events, but im unsure about that. heres the entire script:

local skin = script.Parent.Value.Value
local player = game.Players.LocalPlayer

    if skin == 1 then brickcolor = ("Pastel brown") end
    if skin == 2 then brickcolor = ("Nougat") end
    if skin == 3 then brickcolor = ("Dirt brown") end
    if skin == 4 then brickcolor = ("Tawny") end
    if player:FindFirstChild("Body Colors") then
        local bodyColors = player.Character:WaitForChild("Body Colors")
        bodyColors.Name = "Body Colors"

bodyColors.HeadColor = BrickColor.new(brickcolor)
bodyColors.LeftFootColor = BrickColor.new(brickcolor)
bodyColors.LeftHandColor = BrickColor.new(brickcolor)
bodyColors.LeftLowerArmColor = BrickColor.new(brickcolor)
bodyColors.LeftLowerLegCoolor = BrickColor.new(brickcolor)
bodyColors.LeftUpperArmColor = BrickColor.new(brickcolor)
bodyColors.LeftUpperLegColor = BrickColor.new(brickcolor)
bodyColors.LowerTorsoColor = BrickColor.new(brickcolor)
bodyColors.RightFootColor = BrickColor.new(brickcolor)
bodyColors.RightHandColor = BrickColor.new(brickcolor)
bodyColors.RightLowerArmColor = BrickColor.new(brickcolor)
bodyColors.RightLowerLegColor= BrickColor.new(brickcolor)
bodyColors.RightUpperArmColor = BrickColor.new(brickcolor)
bodyColors.UpperTorsoColor = BrickColor.new(brickcolor)

end
0
Your friend was right, you need to use Events because this has to be handeled from server in order for other players or clients to see your changed body color. AswormeDorijan111 531 — 6y

Answer this question