I'm trying to make it so when the user joins, they will have a random colored head. Here's my script
local Player = game:GetService("Players") Player.PlayerAdded:Connect(function(player) player.Character.Head.BrickColor = BrickColor.Random() end)
There is a typo on line 3, do this instead:
player.Character.Head.BrickColor = BrickColor.random()
remember that function calls are case-sensitive
edit: you should also do this every time the player's character is added because as it stands it will do one of two things:
so try this:
local Player = game:GetService("Players") Player.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) character.Head.BrickColor = BrickColor.random() end) end)
You need the BodyColor:
local Char = game.Players.LocalPlayer.Character local BodyColors = Char:WaitForChild("BodyColors") wait(0.1) BodyColor.Head.BrickColor = BrickColor.random()