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

Help with this script?

Asked by 10 years ago
Children = game.Workspace.TestingModel:GetChildren()
function onClick()
    for x=1, #Children do
        Children[1].BrickColor = BrickColor.new(BrightRed)

    end
end
game.Workspace.RedButton.ClickDetector.MouseClick:connect(onClick)
0
I'm trying to make a button that changes a house's color LegoDude9630 15 — 10y

2 answers

Log in to vote
0
Answered by 10 years ago

What are you trying to do? Also I see one error. On line 4 it should be.

Children[1].BrickColor = BrickColor.new("Bright red")

I don't see any other errors. Hope this helps, but can you please tell me what you are actually trying to do?

Ad
Log in to vote
0
Answered by 10 years ago

This is the fixed script:

Children = game.Workspace.TestingModel:GetChildren()
function onClick()
    for x=1, #Children do
        Children[1].BrickColor = BrickColor.new("Bright red")

    end
end
game.Workspace.RedButton.ClickDetector.MouseClick:connect(onClick)

You had an error were it said:

Children[1].BrickColor = BrickColor.new("Bright red")

Hope this has helped and also what is it you are trying to do?

Answer this question