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

Trying to change a bricks color but won't work?

Asked by 9 years ago

I was working on a script when all of a sudden this really simple line of code (Line 4) stopped working and I removed the line of code and the script worked

function Button (h)
    if h.Parent:FindFirstChild("Humanoid") then
        if game.Workspace.Button2.ButtonII.BrickColor == ("BrightRed") then
        game.Workspace.Button2.ButtonII.BrickColor = ("BrightRed")
        CurrentValue = Game.Workspace.Value.Value
        game.Workspace.Value.Value = (CurrentValue + 1)
        end
    end
end

game.Workspace.Button2.ButtonII.Touched:connect(Button)

and the output just says and error occurred

1 answer

Log in to vote
0
Answered by 9 years ago

This is how you change the color of a brick

game.Workspace.Button2.ButtonII.BrickColor = BrickColor.new("Red")
0
Still not working :\ ghostbeater12 25 — 9y
Ad

Answer this question