Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I change the color of someone's character parts?

I've been trying multiple ways of doing this, yet I never get it right.

game.Players.PlayerAdded:connect(function(player)
    player.CharacterAdded:connect(function(character)
        character.Head.BrickColor = BrickColor.new("Really black")
character["Left Arm"].BrickColor = BrickColor.new("Really black")
character["Right Arm"].BrickColor = BrickColor.new("Really black")
character["Right Leg"].BrickColor = BrickColor.new("Really black")
character["Left Leg"].BrickColor = BrickColor.new("Really black")
character["Torso"].BrickColor = BrickColor.new("Really black")
    end)
end)

6 comments

0

I've already tried doing it through BodyColors

0

Did you try removing the BodyColors object altogether, then changing the colors of the parts?

0

Just tried that. I used the WaitForChild Method and I destroyed it. Lines 3-8 came after it but it made me look like the ROBLOX noob.

0

go to Menu CLick on characters and scrol down

0

Try my way.

0

Just tested it, doesn't work.

5 answers

It's possible that the BodyColors object is overwriting the colors you set there. You can either remove this object from the character, or modify the object itself.

I don't see any problems in the code. I believe the problem that you are experiencing is, quite simply, an issue with the CharacterAdded event firing before all the body parts are loaded. To fix this issue, I would simply add a wait after the CharacterAdded event,

game.Players.PlayerAdded:connect(function(player)
	player.CharacterAdded:connect(function(character)
		wait(1) -- Wait for parts within the character to load
		for _, child in pairs(character:GetChildren()) do
			if child:IsA("BasePart") then
				child.BrickColor = BrickColor.new("Really black")
			end
		end
	end)
end)

If that doesn't fix it, I would refer to Kenetec's post.

I recommend doing this script first then make that script second to make it work

game.Players.PlayerAdded:connect(function(Plr)
    Plr.CanLoadCharacterAppearance = false
end)

(Its the appearance that takes there cloths and shirts + Hats off witch makes the BodyColros show)

Guys, I found the solution. Though I didn't test it yet.

game.Players.PlayerAdded:Connect(function(player)
    player.CharacterAdded:Connect(function(character)
	    if character ~= nil then
		    --- Put code here.
		end
	end)
end)

It probably doesn't work though.

I dont know if BrickColor is a property of the head. Or maybe remove the charater function and use the player if the other one doesn't work. Look at the properties. Or maybe the head is the problem. Try this for the head:

character["Head"].BrickColor = --What you want here..

3 comments

0

why I get -1 reputation D:

0

I didn't do it, but that's basically what I said... Look at Brick Color

0

nothing on link D:

This discussion is preserved as it was. New answers, comments, and votes are closed.