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

How can I fix my Color 3 in my script to change brick color of multiple parts?

Asked by
WishXVI 94
3 years ago

So I've been trying to change the color of a hell of alot of parts and I wanted to use the command bar to sort through them and just recolor it.

For I'm getting something wrong in the Color Value and I don't know how to fix it

for _, v in pairs (game.workspace:GetDescendants())do
if v.Name == 'A' then v.Color = (98 71 50) 
end
end

It says something about expected ) not 71. Can someone help me fix this (free reputation amirite)

0
the error is or _, v in pairs (game.workspace:GetDescendants())do if v.Name == 'A' then v.Color = (98 71 50) end end:2: Expected ')' (to close '(' at column 33), got '71' btw WishXVI 94 — 3y
0
@BulletproofVast end:3: Expected ')' (to close '(' at column 18), got '71' - Studio WishXVI 94 — 3y

1 answer

Log in to vote
1
Answered by 3 years ago
for _, v in pairs (game.workspace:GetDescendants())do
    if v.Name == 'A' and v:IsA'BasePart' then 
        --v.Color = (98 71 50) 
        v.BrickColor = Color3.new(98, 71, 50)
    end
end
0
Hold on, v.BrickColor = Color3.new(98,71,50)? Shouldnt it be v.BrickColor = BrickColor.new(Color3.fromRGB(98,71,50))? RAFA1608 543 — 3y
Ad

Answer this question