So I've been making a character editor gui and it's supposed to set your appearance at the start of the game and let you select your appearance once you've opened up the gui but it only works in the studio. Can someone tell me what I'm doing wrong?
Here's one of the local scripts:
local Player = game.Players.LocalPlayer local Character = Player.Character local RB = script.Parent:WaitForChild("Right") local LB = script.Parent:WaitForChild("Left") local Type = script.Parent:WaitForChild("Type") local SkinColorNumber = script:WaitForChild("SkinColorNumber") RB.MouseButton1Down:connect(function() SkinColorNumber.Value = SkinColorNumber.Value + 1 end) LB.MouseButton1Down:connect(function() SkinColorNumber.Value = SkinColorNumber.Value - 1 end) while true do if SkinColorNumber.Value < 1 then SkinColorNumber.Value = 5 end if SkinColorNumber.Value == 1 then Character:WaitForChild("Head").BrickColor = BrickColor.new("Pastel brown") Character:WaitForChild("RightUpperArm").BrickColor = BrickColor.new("Pastel brown") Character:WaitForChild("LeftUpperArm").BrickColor = BrickColor.new("Pastel brown") Type.Text = "1" end if SkinColorNumber.Value == 2 then Character:WaitForChild("Head").BrickColor = BrickColor.new("Light orange") Character:WaitForChild("RightUpperArm").BrickColor = BrickColor.new("Light orange") Character:WaitForChild("LeftUpperArm").BrickColor = BrickColor.new("Light orange") Type.Text = "2" end if SkinColorNumber.Value == 3 then Character:WaitForChild("Head").BrickColor = BrickColor.new("Rust") Character:WaitForChild("RightUpperArm").BrickColor = BrickColor.new("Rust") Character:WaitForChild("LeftUpperArm").BrickColor = BrickColor.new("Rust") Type.Text = "3" end if SkinColorNumber.Value == 4 then Character:WaitForChild("Head").BrickColor = BrickColor.new("Reddish brown") Character:WaitForChild("RightUpperArm").BrickColor = BrickColor.new("Reddish brown") Character:WaitForChild("LeftUpperArm").BrickColor = BrickColor.new("Reddish brown") Type.Text = "4" end if SkinColorNumber.Value == 5 then Character:WaitForChild("Head").BrickColor = BrickColor.new("Bright yellow") Character:WaitForChild("RightUpperArm").BrickColor = BrickColor.new("Bright yellow") Character:WaitForChild("LeftUpperArm").BrickColor = BrickColor.new("Bright yellow") Type.Text = "5" end if SkinColorNumber.Value > 5 then SkinColorNumber.Value = 1 end wait() end