roblox make a rainbow part

Here is a step-by-step guide on how to create a rainbow part using Lua in Roblox:

Step 1: Create a new part To begin, you need to create a new part in Roblox. This part will serve as the base for your rainbow effect.

Step 2: Add a SurfaceLight to the part Next, you will add a SurfaceLight object to the part. The SurfaceLight will be responsible for emitting light and creating the rainbow effect.

Step 3: Set the SurfaceLight color sequence Once you have added the SurfaceLight object, you need to set its ColorSequence property. The ColorSequence property defines the colors that will be used in the rainbow effect. You can create a ColorSequence object and specify the desired color sequence.

Step 4: Adjust the SurfaceLight properties To refine the rainbow effect, you can adjust various properties of the SurfaceLight object. Some properties you might consider modifying include the Range, Brightness, and Angle properties. Experiment with different values to achieve the desired effect.

Step 5: Attach the SurfaceLight to the part Finally, you will need to attach the SurfaceLight object to the part. Use the Parent property to specify the part as the parent of the SurfaceLight.

By following these steps, you should be able to create a rainbow part in Roblox using Lua. Remember to experiment with different settings and properties to achieve the desired rainbow effect.