Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Brick color change script??

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

3 comments

0

do you want it to change to different colors? or is it just to change to one color?

0

rainbow colors

0

Those are contradicting Color properties., you need to cast the respective datatype.

2 answers

Your code would look like this:

while wait(1) do
     script.Parent.BrickColor = BrickColor.Random()
end

2 comments

0

ye but im trying to replicate this script:

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))

I hope this fixed your script! :)

local SECONDS_PER_LOOP = .35

while wait(SECONDS_PER_LOOP) do
	script.Parent.BrickColor = BrickColor.random()
end

4 comments

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)).

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.

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)).

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

This discussion is preserved as it was. New answers, comments, and votes are closed.