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

why is the color not matching for my spotlight?

Ok so ive managed to change the colors for multiple spotlights. One is called spotlight_2 and one is called spotlight_1

in spotlight_2 i there is my rainbow light script which is located in the beam in the spotlight:

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

In spotlight_1 i have done a script so the color equals to spotlight_2 hich is located in the beam in the spotlight:

while true do
    script.Parent.Color = script.Parent.Parent.Parent.Parent.Parent.Parent.Spotlight_2.Body.Head.Beam.light.Color-- This will copy the color if the MainSpotLight
    wait(1)
end

they both change colors but they dont match color when they change. how can i fix this?

2 comments

0

Idea: Copy the script from spotlight_ 2 to spotlight_1, only changing the parts that contain spotlight_2. It may be a bit more work, but it might fix your error.

0

dont work, i want it to match (same colors)

1 answer

Possibly try this:

while true do
    script.Parent.Color = workspace.MainSpotLight.Color -- Idk where it is, you may have to change some of this.
    wait(1)
end

If that doesn't work, then I'm all out of ideas.

2 comments

0

didnt work when i replaced, it changes i just want it to sync the colors so it has the same colors when it changes color

0

sorry I'm a bit late to this, but change the wait(1) to wait(.001) or the smallest value that works.

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