✓ Accepted answer
Here's a nice dealio using a table and the Body Colors object of character models.
bodyColors = {'HeadColor', 'LeftArmColor', 'LeftLegColor', 'RightArmColor', 'RightLegColor', 'TorsoColor'}
for _,color in pairs(bodyColors) do
workspace.Player1["Body Colors"][color] = BrickColor.new("Institutional white")
end
You can use the PlayerAdded event and the CharacterAdded event to make a character's body Institution white everytime they respawn.
bodyColors = {'HeadColor', 'LeftArmColor', 'LeftLegColor', 'RightArmColor', 'RightLegColor', 'TorsoColor'}
game:GetService('Players').PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(char)
for _,color in pairs(bodyColors) do
char["Body Colors"][color] = BrickColor.new("Institutional white")
end
end)
end)
Though there may be some cases that a character won't have the Body Colors object so this may work.
bodyParts = {'Head', 'Left Arm', 'Left Leg', 'Right Arm', 'Right Leg', 'Torso'}
game:GetService('Players').PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(char)
for _,part in pairs(bodyParts) do
char[part].BrickColor = BrickColor.new("Institutional white")
end
end)
end)
~coo1o
1 comment
Thanks, This helped me alot. but I was trying to change the Entire Body Color to "Institutional white". Do you just keep Repeating the same line?