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

Changing colour of brick in studio?

Asked by 5 years ago

If I wanted to change the colour of a brick in Roblox Studio what would I be required to do?

Sources, links, quick replies is what I'm looking for.

I am creating a disco ball and my "club" needs one in order for us to BOOGEY!

However this is as far as I have got, what do you think?

discoball = Instance.new("Part")
discoball.BrickColor = Random() -- ?
discoball.Parent = game.Workspace

As you see it is giving me output errors such as invalid command or something...

1 answer

Log in to vote
0
Answered by 5 years ago

If you want to have a disco ball that consistently changes colors, you can use BrickColor.random() in a loop. You should also make your disco ball in the workspace instead of using the Instance.new() constructor function. Here's an example of how to do this:

local discoball = workspace.Discoball -- locate your disco ball, assuming it is one part.
while true do
    wait(1) -- time between each color change
    discoball.BrickColor = BrickColor.random()
end

Hope this helps!

0
I have one problem! Maginatoc -5 — 5y
0
I didn't test this, please let me know if it doesn't work! I would be glad to try and fix it. MegaManSam1 207 — 5y
0
What's the problem? MegaManSam1 207 — 5y
Ad

Answer this question