Answered by
3 years ago Edited 3 years ago
There is a typo on line 3, do this instead:
1 | 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:
- give an error because the player is added before the character is
- if the character exists, this will only happen once and if the person dies, resets their character, etc. their head will go back to normal
so try this:
1 | local Player = game:GetService( "Players" ) |
2 | Player.PlayerAdded:Connect( function (player) |
3 | player.CharacterAdded:Connect( function (character) |
4 | character.Head.BrickColor = BrickColor.random() |