Intro to Scripting: Make a Dance Floor
|This is an Basic, Brick related tutorial.|
Here's a very simple script that can liven up your place a little.
- Edit your place in GoodBlox Studio and select a brick of any color.
- Now select Insert-->Object from the menu bar.
- Type “Script” and click OK.
- Double-click the Script
- You will now see a script editor window
- Paste the following code into the script window
while true do script.Parent.Color = Color3.new(math.random(), math.random(), math.random()) wait(0.5) end
wait(0.5) line is very important. If you forget to put it in, your place will freeze up. No fun.
Close the script window. That’s it! If you upload your place and visit it, the brick will blink to a new color 2 times per second.
To make more bricks blink, repeat the following steps:
- Copy the Script object in the Explorer
- Right-click another brick
- Select "Paste Into" from the menu
The initial color that you choose for your bricks is unimportant; they will all change randomly and in different ways. Therefore, they can all be the same initial color, making it easier to set up the map.