How can i edit this script so it works? Note: this script is placed in a part
local SECONDS_PER_LOOP = 5
while wait(1) do
script.Parent.BrickColor = Color3.fromHSV((tick()/SECONDS_PER_LOOP)%1,1,1)
end
How can i edit this script so it works? Note: this script is placed in a part
local SECONDS_PER_LOOP = 5
while wait(1) do
script.Parent.BrickColor = Color3.fromHSV((tick()/SECONDS_PER_LOOP)%1,1,1)
end
Your code would look like this:
while wait(1) do
script.Parent.BrickColor = BrickColor.Random()
end
ye but im trying to replicate this script:
local SECONDS_PER_LOOP = 5 for i,v in pairs(lights) do if v.Name == "light" then v.Color = ColorSequence.new(Color3.fromHSV((tick()/SECONDS_PER_LOOP)%1,1,1))
I hope this fixed your script! :)
local SECONDS_PER_LOOP = .35
while wait(SECONDS_PER_LOOP) do
script.Parent.BrickColor = BrickColor.random()
end
nope it doesnt match the speed of my other light color script. Light script: local SECONDS_PER_LOOP = 5 for i,v in pairs(lights) do if v.Name == "light" then v.Color = ColorSequence.new(Color3.fromHSV((tick()/SECONDS_PER_LOOP)%1,1,1)).
Okay so I made an edit to my script hopefully this helps you out. It should run as FAST as your light color script.
not changing color at same speed still. double check my script: Light script: local SECONDS_PER_LOOP = 5 for i,v in pairs(lights) do if v.Name == "light" then v.Color = ColorSequence.new(Color3.fromHSV((tick()/SECONDS_PER_LOOP)%1,1,1)).
local folder = script.parent.parent.parent.Beam--change this to whatever all your spotlights are in local lights = folder:GetDescendants() while wait(1) do local SECONDS_PER_LOOP = 5 for i,v in pairs(lights) do if v.Name == "light" then v.Color = ColorSequence.new(Color3.fromHSV((tick()/SECONDS_PER_LOOP)%1,1,1)) end end end
This discussion is preserved as it was. New answers, comments, and votes are closed.
3 comments
do you want it to change to different colors? or is it just to change to one color?
rainbow colors
Those are contradicting Color properties., you need to cast the respective datatype.