So basically I wanted to make an attempt to change the character parts colors of the players who join my game by using this script:
Script
local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(plrchar)
for i, v in next, plrchar:GetChildren() do
if v:IsA("Part") then
v.Color = Color3.fromRGB(0,0,0)
print("done")
end
end
end)
end)
But the problem is that the parts don’t turn into the new color that the script is giving them and the only thing that I have noticed is that it only prints 2 times and then stop like shown in the image below:
But what it’s actually supposed to do is that it should print “done” depending on the number of parts that your character has but I have no idea why it does that instead, does anyone have any solutions or does anyone know what’s the best way to change the character parts colors?
local bodyColors = character:FindFirstChild("Body Colors")
if bodyColors then
bodyColors.HeadColor = color
bodyColors.LeftArmColor = color
bodyColors.LeftLegColor = color
bodyColors.RightArmColor = color
bodyColors.RightLegColor = color
bodyColors.TorsoColor = color
end