Here is the code:
player = script.Parent.Parent player.CanLoadCharacterAppearance = false character = player.Character character.Head.BrickColor = BrickColor.new("Bright yellow") character.Torso.BrickColor = BrickColor.new("Bright yellow") character["Left Arm"].BrickColor = BrickColor.new("Bright yellow") character["Right Arm"].BrickColor = BrickColor.new("Bright yellow") character["Left Leg"].BrickColor = BrickColor.new("Bright yellow") character["Right Leg"].BrickColor = BrickColor.new("Bright yellow") game.ServerStorage.farmer:GetChildren():Clone().Parent = character
It keeps erring, saying that Clone is a nil value, but I clearly assigned the parent of character to the clone. Anyways, it would be great to help with this and also is there an easier way to color the character's body colors without doing each and every part?
Thanks in advanced
The problem is that GetChildren()
returns a table containing the children, but Clone()
can only be called on an individual child. You need to loop through the table and call Clone()
on each child, like this:
for i, v in ipairs(game.ServerStorage.farmer:GetChildren()) do v:Clone().Parent = character end