Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Help with this script?

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)

1 comment

0

I'm trying to make a button that changes a house's color

2 answers

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?

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?

This discussion is preserved as it was. New answers, comments, and votes are closed.