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

why is the color not matching for my spotlight?

Asked by 4 years ago
Edited 4 years ago

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?

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. antaramize 15 — 4y
0
dont work, i want it to match (same colors) forsakern 12 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

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.

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 forsakern 12 — 4y
0
sorry I'm a bit late to this, but change the wait(1) to wait(.001) or the smallest value that works. antaramize 15 — 4y
Ad

Answer this question