(This is in addition to docrobloxman52's answer)
To turn all of the character's parts black, you can iterate over the character's parts:
parts = hit.Parent:GetChildren()
for i = 1, #parts do
if parts[i]:IsA("BasePart") then
parts[i].BrickColor = BrickColor.new("Black")
end
end
(Regarding your comment) If you wish to access a specific part with a space in the name, you can use :FindFirstChild to make sure it's there, or simply use hit.Parent["Left Arm"] (but that will error if Left Arm doesn't exist). So, if you wanted to change their Left Arm to Red, you might do:
local leftArm = hit.Parent:FindFirstChild("Left Arm")
if leftArm then
leftArm.BrickColor = BrickColor.new("Bright red")
end
8 comments
What about the BodyColor though?
Did not even work. Thank you anyway.
What colors?
Sir I just edited it try it now
It works now
Thanks but I still need to change the body color.
Okay what colors?
Black for all. Also, is it possible to identify Left Arm, Right Arm, Left Leg, and Right Leg in a Script?