well im making a Morph code, that when the player joins the game they look like a certain character, and the torso is supposed to be a random color. What's wrong with it?
game.Workspace.ChildAdded:connect(function(plr)
local name = plr.Name
local playerinplayers = game.Player:FindFirstChild(plr.Name)
if playerinplayers ~= nil then
playerinplayers.CanLoadCharacterAppearance = false
plr.Head.face.Texture = "rbxassetid://24791658"
local bodycolors = Instance.new("BodyColors", plr)
bodycolors.RightArmColor = BrickColor.new("Pastel brown")
bodycolors.LeftArmColor = BrickColor.new("Pastel brown")
bodycolors.LeftLegColor = BrickColor.new("Dark stone grey")
bodycolors.RightLegColor = BrickColor.new("Dark stone grey")
bodycolors.TorseColor = BrickColor.Random()
bodycolors.HeadColor = BrickColor.new("Pastel Brown")
end

1 comment
Why don't you change the Arms, Legs, ect. inside the Character, isn't of having the 'BodyColors' instance do it(, I don't use it, so I don't know it's purpose)? Also, you spelled 'Players' wrong on line 3. :)