I need this script to change the light's color every .1 second. Why won't it work?
while true do script.Parent.Spotlight.Color = Color3.new(math.random(), math.random(), math.random()) wait(0.1) end
Btw this is for a nightclub map in one of my games :D
I tested it in Studio and it does work. Did you typo "Spotlight" instead of "SpotLight"? Or maybe your script's Parent doesn't contain the Spotlight object.
while true do script.Parent.SpotLight.Color = Color3.new(math.random(1,255)/255, math.random(1,255)/255, math.random(1,255)/255); wait(0.1) end
This should do it. Be warned that I renamed Spotlight
to SpotLight
.