I've created a script that customizes a player's hair, face, and clothing when they join. The face and hair appear to be working, but the clothing doesn't. Any idea why?
Shirt1 = "rbxassetid://663700538" --boy match Shirt2 = "rbxassetid://1361051235" --boy match Shirt3 = "rbxassetid://591071432" --boy match Shirt4 = "rbxassetid://1117724225" --boy match Shirt5 = "rbxassetid://1953856314" --boy match Shirt6 = "rbxassetid://943047235" --boy single Shirt7 = "rbxassetid://942999747" --blue tunic single Shirt11 = "rbxassetid://340408952" --magician magnostadt Shirt12 = "rbxassetid://338904344" --male reim outfit Shirt13 = "rbxassetid://338904457" --female reim outfit
A list of variables that have the ID's saved.
--Clothes if MaleOutfitChance == 1 then Shirt.ShirtTemplate = Shirt1 Shirt.Parent = player.Character Pants.PantsTemplate = Pants1 Pants.Parent = player.Character elseif MaleOutfitChance == 2 then Shirt.ShirtTemplate = Shirt2 Shirt.Parent = player.Character Pants.PantsTemplate = Pants2 Pants.Parent = player.Character elseif MaleOutfitChance == 3 then Shirt.ShirtTemplate = Shirt3 Shirt.Parent = player.Character Pants.PantsTemplate = Pants3 Pants.Parent = player.Character elseif MaleOutfitChance == 4 then Shirt.ShirtTemplate = Shirt4 Shirt.Parent = player.Character Pants.PantsTemplate = Pants4 Pants.Parent = player.Character elseif MaleOutfitChance == 5 then Shirt.ShirtTemplate = Shirt5 Shirt.Parent = player.Character Pants.PantsTemplate = Pants5 Pants.Parent = player.Character end
There is a variable named MaleOutfitChance that is a math.random. If that number is a certain one, the player is given certain shirts and pants.
I've also created two variables, "Shirt" and "Pants" that create new instances of shirts and pants respectively. Simply changing the shirt template ID to fit.
https://gyazo.com/cd1d6ce7a13129c06e1beca5cdf6a0c5