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
game.Workspace.ChildAdded:connect(function(plr) local name = plr.Name local playerinplayers = game.Players:FindFirstChild(plr.Name) local asset = "rbxassetid://" -- asset link if playerinplayers ~= nil then playerinplayers.CanLoadCharacterAppearance = false plr.Head.face.Texture = "rbxasset://63761658" -- changes face local bodycolors = Instance.new("BodyColors", plr) bodycolors.RightArmColor = BrickColor.new("Pastel Brown") -- changes player color bodycolors.LeftArmColor = BrickColor.new("Pastel Brown") bodycolors.LeftLegColor = BrickColor.new("Dark stone grey") bodycolors.RightLegColor = BrickColor.new("Dark stone grey") bodycolors.HeadColor = BrickColor.new("Pastel Brown") bodycolors.TorsoColor = BrickColor.new(math.random()) local shirt = Instance.new("Shirt", plr) shirt.ShirtTemplate = asset.."0" set to shirt template id local pants = Instance.new("Pants", plr) pants.PantsTemplate = asset.."0" -- set to pants template id end end)
Here ya go
it should be (math.random())
not .Random()