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

Color Changing Light Script Tips?

Asked by 3 years ago
Edited 3 years ago

So, I've tried a few different things for this and nothing seems to work. I'm working on making a light slowly change color at the click of a button. I have named the light "light1" and I have put it in the model "PromLights". Any tips or ideas would be appreciated! Thanks so much!

Here's a sample of the script I made:

game.Workspace.PromLights.light1.SpotLight = Color3.new (226, 158, 255)
wait (0.2)
game.Workspace.PromLights.light1.SpotLight = Color3.new (233, 153, 255)
wait (0.2)
game.Workspace.PromLights.light1.SpotLight = Color3.new (240, 151, 255)
0
You need to include the "Color" attribute of the spotlight as well. (Ex. "Spotlight.Color3 = Color3.new (240, 151, 255)") Benbebop 1049 — 3y
0
Oh and also Color3.new uses a scale of 0-1 not 0-255, you would want to use Color3.fromRGB() instead. Benbebop 1049 — 3y
0
Thank you so much!! The script finally works! wsing12345 0 — 3y
0
If it worked please edit your post and add "[SOLVED]" to the title. Benbebop 1049 — 3y

Answer this question