Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by
Shawnyg 4330 Trusted Badge of Merit Snack Break Moderation Voter Community Moderator
10 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 4330 — 10y
0
Did you try removing the BodyColors object altogether, then changing the colors of the parts? User#11893 186 — 10y
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 4330 — 10y
0
go to Menu CLick on characters and scrol down tawfeeq2007 -7 — 7y
View all comments (2 more)
0
Try my way. DogHouseForMe 0 — 5y
0
Just tested it, doesn't work. DogHouseForMe 0 — 5y

Locked by JesseSong

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?

5 answers

Log in to vote
0
Answered by 10 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 495 Moderation Voter
10 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 10 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 5 years 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 10 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 — 10y
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 4330 — 10y
0
nothing on link D: Randomplayer121 -2 — 10y