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

Brick color change script??

Asked by 4 years ago

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
0
do you want it to change to different colors? or is it just to change to one color? Mayk728 855 — 4y
0
rainbow colors forsakern 12 — 4y
0
Those are contradicting Color properties., you need to cast the respective datatype. Ziffixture 6913 — 4y

2 answers

Log in to vote
0
Answered by 4 years ago

Your code would look like this:

while wait(1) do
     script.Parent.BrickColor = BrickColor.Random()
end
0
ye but im trying to replicate this script: forsakern 12 — 4y
0
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)) forsakern 12 — 4y
Ad
Log in to vote
0
Answered by
Tokyo7979 131
4 years ago
Edited 4 years ago

I hope this fixed your script! :)

local SECONDS_PER_LOOP = .35

while wait(SECONDS_PER_LOOP) do
    script.Parent.BrickColor = BrickColor.random()
end
0
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)). forsakern 12 — 4y
0
Okay so I made an edit to my script hopefully this helps you out. It should run as FAST as your light color script. Tokyo7979 131 — 4y
0
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)). forsakern 12 — 4y
0
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 forsakern 12 — 4y

Answer this question