I am currently making a Character Customization Menu, but I cannot change the player’s character for some odd reason. The script is a Script inside of ServerScriptServer.
function LoadPlayer(Player)
print("LoadPlayer")
local Color = Player.CharEditor.Color.Value
local PantNum = Player.CharEditor.Pants.Value
local ShirtNum = Player.CharEditor.Shirts.Value
if ShirtNum == "1" then
local char = Player.Character
char:FindFirstChild("Shirt").ShirtTemplate = "http://www.roblox.com/asset/?id=404851338"
elseif ShirtNum == "2" then
local char = Player.Character
char:FindFirstChild("Shirt").ShirtTemplate = "http://www.roblox.com/asset/?id=170488164"
elseif ShirtNum == "3" then
local char = Player.Character
char:FindFirstChild("Shirt").ShirtTemplate = "http://www.roblox.com/asset/?id=121612315"
elseif ShirtNum == "4" then
local char = Player.Character
char:FindFirstChild("Shirt").ShirtTemplate = "http://www.roblox.com/asset/?id=162011443"
elseif ShirtNum == "5" then
local char = Player.Character
char:FindFirstChild("Shirt").ShirtTemplate = "http://www.roblox.com/asset/?id=128491510"
elseif ShirtNum == "6" then
local char = Player.Character
char:FindFirstChild("Shirt").ShirtTemplate = "http://www.roblox.com/asset/?id=147445001"
elseif ShirtNum == "7" then
local char = Player.Character
char:FindFirstChild("Shirt").ShirtTemplate = "http://www.roblox.com/asset/?id=2894287601"
elseif ShirtNum == "8" then
local char = Player.Character
char:FindFirstChild("Shirt").ShirtTemplate = "http://www.roblox.com/asset/?id=5092540626"
elseif ShirtNum == "9" then
local char = Player.Character
char:FindFirstChild("Shirt").ShirtTemplate = "http://www.roblox.com/asset/?id=5309295347"
elseif ShirtNum == "10" then
local char = Player.Character
char:FindFirstChild("Shirt").ShirtTemplate = "http://www.roblox.com/asset/?id=5309295347"
end
if PantNum == "1" then
local char = Player.Character
char:FindFirstChild("Pants").PantsTemplate = "http://www.roblox.com/asset/?id=2151988427"
elseif PantNum == "2" then
local char = Player.Character
char:FindFirstChild("Pants").PantsTemplate = "http://www.roblox.com/asset/?id=2679496243"
elseif PantNum == "3" then
local char = Player.Character
char:FindFirstChild("Pants").PantsTemplate = "http://www.roblox.com/asset/?id=6137040403"
elseif PantNum == "4" then
local char = Player.Character
char:FindFirstChild("Pants").PantsTemplate = "http://www.roblox.com/asset/?id=1310089742"
elseif PantNum == "5" then
local char = Player.Character
char:FindFirstChild("Pants").PantsTemplate = "http://www.roblox.com/asset/?id=146497046"
end
if Color == "PastelBrown" then
local x = BrickColor.new("Pastel brown")
local char = Player.Character
char.Head.BrickColor = x
char.UpperTorso.BrickColor = x
char["RightLowerArm"].BrickColor = x
char["LeftLowerArm"].BrickColor = x
char["RightLowerLeg"].BrickColor = x
char["LeftLowerLeg"].BrickColor = x
char["RightUpperArm"].BrickColor = x
char["LeftUpperArm"].BrickColor = x
char["RightUpperLeg"].BrickColor = x
char["LeftUpperLeg"].BrickColor = x
char["RightFoot"].BrickColor = x
char["LeftFoot"].BrickColor = x
char["RightHand"].BrickColor = x
char["LeftHand"].BrickColor = x
elseif Color == "BrownYellowishOrange" then
local x = BrickColor.new("Br. yellowish orange")
local char = Player.Character
char.Head.BrickColor = x
char.UpperTorso.BrickColor = x
char["RightLowerArm"].BrickColor = x
char["LeftLowerArm"].BrickColor = x
char["RightLowerLeg"].BrickColor = x
char["LeftLowerLeg"].BrickColor = x
char["RightUpperArm"].BrickColor = x
char["LeftUpperArm"].BrickColor = x
char["RightUpperLeg"].BrickColor = x
char["LeftUpperLeg"].BrickColor = x
char["RightFoot"].BrickColor = x
char["LeftFoot"].BrickColor = x
char["RightHand"].BrickColor = x
char["LeftHand"].BrickColor = x
elseif Color == "ReddishBrown" then
local x = BrickColor.new("Reddish brown")
local char = Player.Character
char.Head.BrickColor = x
char.UpperTorso.BrickColor = x
char["RightLowerArm"].BrickColor = x
char["LeftLowerArm"].BrickColor = x
char["RightLowerLeg"].BrickColor = x
char["LeftLowerLeg"].BrickColor = x
char["RightUpperArm"].BrickColor = x
char["LeftUpperArm"].BrickColor = x
char["RightUpperLeg"].BrickColor = x
char["LeftUpperLeg"].BrickColor = x
char["RightFoot"].BrickColor = x
char["LeftFoot"].BrickColor = x
char["RightHand"].BrickColor = x
char["LeftHand"].BrickColor = x
elseif Color == "BrickYellow" then
local x = BrickColor.new("Brick yellow")
local char = Player.Character
char.Head.BrickColor = x
char.UpperTorso.BrickColor = x
char["RightLowerArm"].BrickColor = x
char["LeftLowerArm"].BrickColor = x
char["RightLowerLeg"].BrickColor = x
char["LeftLowerLeg"].BrickColor = x
char["RightUpperArm"].BrickColor = x
char["LeftUpperArm"].BrickColor = x
char["RightUpperLeg"].BrickColor = x
char["LeftUpperLeg"].BrickColor = x
char["RightFoot"].BrickColor = x
char["LeftFoot"].BrickColor = x
char["RightHand"].BrickColor = x
char["LeftHand"].BrickColor = x
end
print(Color)
print(PantNum)
print(ShirtNum)
print("Done")
end
Everything is printing properly, but I cannot change the player’s character for some odd reason.