-1

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

local Lighting = a

a.ambient = 0, 255, 255

wait (1)

a.ambient = 0, 255, 0

wait (1)

a.ambient = 255, 0, 0

wait (1)

a.ambient = 255, 255, 0

wait (1)

a.ambient = 255, 85, 0

wait (1)

a.ambient = 170, 0, 255

wait (1)

I just don't know what's wrong, what I want it to do is Change ambient after one second and repeat those ambients in a loop so the script continously repeats itslelf. Any help?

1
Dummiez 360
7 years ago

Declare your variable before calling what you want your variable to be. Also, Ambient takes in Color3 values, so it would be something like this, as well as a loop required.

local a = game.Lighting
while true do
a.Ambient = Color3.new(0, 255, 255)
wait(1)

a.Ambient = Color3.new(0, 255, 0)
wait(1)

a.Ambient = Color3.new(255, 0, 0)
wait(1)

a.Ambient = Color3.new(255, 255, 0)
wait(1)

a.Ambient = Color3.new(255, 85, 0)
wait(1)

a.Ambient = Color3.new(170, 0, 255)
wait(1)
end

0
Thank you so much, xD I am very new with scripting noob1126 34 — 7y