Roblox Studio Tutorials - June 6, 2022

How to Make Color Changing Lights


Buzzy Beth


Download – Color Changing Script

How To – Make Color Changing Lights in Roblox Studio

What’s up everyone, BuzzyBeth here – In this tutorial we’ll be learning how to make color changing lights!

  • Inside our workspace let’s go ahead and spawn in a part. For our part go ahead and position it to wherever you want the light to appear and then make sure to anchor our part as well as setting the transparency of it to one because I don’t want to see this part, but if you do then you don’t have to set the transparency of it.
  • Go ahead and add a surface light object inside of your part. Right now it’s not facing the correct way, so go ahead and change the face so that it says bottom. You can also change the brightness of our surface light, you can set to zero which you probably won’t see anything or a very high number!
  • Inside of our surface light go ahead and add a script.
  • We have a variable which references our light part and then we’re going to go ahead and do a while wait do loop and basically the light is going to change every two seconds. Then we’re going to do light.color = and we’re actually going to set it so that the color changes to a random (r,g,b) value. You see how we have math.random for the r math.random for the g and math.random for the b? Out of the 255 colors it’s just going to go ahead and choose a random color!