Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

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

Asked by
Shawnyg 4241 Trusted Badge of Merit Snack Break Moderation Voter Administrator Community Moderator Super Administrator
6 years ago

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)
0
I've already tried doing it through BodyColors Shawnyg 4241 — 6y
0
Did you try removing the BodyColors object altogether, then changing the colors of the parts? User#11893 186 — 6y
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. Shawnyg 4241 — 6y
0
Try my way. DogHouseForMe 0 — 1y
0
Just tested it, doesn't work. DogHouseForMe 0 — 1y

6 answers

Log in to vote
0
Answered by 6 years ago

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.

Ad
Log in to vote
0
Answered by
nate890 490 Moderation Voter
6 years ago

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.

Log in to vote
0
Answered by 6 years ago

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)

Log in to vote
0
Answered by 1 year ago

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.

Log in to vote
-1
Answered by 6 years ago

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..
0
why I get -1 reputation D: Randomplayer121 2 — 6y
0
I didn't do it, but that's basically what I said... Look at [Brick Color](http://wiki.roblox.com/index.php?title=BrickColor_(Property)) Shawnyg 4241 — 6y
0
nothing on link D: Randomplayer121 2 — 6y
Log in to vote
-1
Answered by 3 years ago

go to Menu CLick on characters and scrol down

Answer this question