So im trying to make my spotlight beam change color (in a rainbow form) and ive placed the script in the part where the beam is located in.
why is it not changing the beam color? Note: im trying to make my stage spotlight change colors Script: while true do script.Parent.light = Color3.new(math.random(), math.random(), math.random()) wait(1) end
You forgot to put .Color when defining the light, so you script would look like this
while true do script.Parent.light.Color = Color3.new(math.random(), math.random(), math.random()) wait(1) end
EDIT: I'm still quite confused on what you are asking, but If I'm understanding right this should work
while true do script.Parent.Color = ColorSequence.new(Color3.fromRGB(math.random(0,255),math.random(0,255),math.random(0,255)),Color3.fromRGB(math.random(0,255),math.random(0,255),math.random(0,255))) wait(1) end
I made this script for the parts if you were interested in making rainbow parts, this script should also work for smoke. Sadly, this script does not work for Beams, here is the script I made:
local text = script.Parent local add = 10 wait(1) local k = 1 while k <= 255 do text.Color = Color3.new(k/255,0/255,0/255) k = k + add wait() end while true do k = 1 while k <= 255 do text.Color = Color3.new(255/255,k/255,0/255) k = k + add wait() end k = 1 while k <= 255 do text.Color = Color3.new(255/255 - k/255,255/255,0/255) k = k + add wait() end k = 1 while k <= 255 do text.Color = Color3.new(0/255,255/255,k/255) k = k + add wait() end k = 1 while k <= 255 do text.Color = Color3.new(0/255,255/255 - k/255,255/255) k = k + add wait() end k = 1 while k <= 255 do text.Color = Color3.new(k/255,0/255,255/255) k = k + add wait() end k = 1 while k <= 255 do text.Color = Color3.new(255/255,0/255,255/255 - k/255) k = k + add wait() end while k <= 255 do text.Color = Color3.new(255/255 - k/255,0/255,0/255) k = k + add wait() end end