I want all the lights in the game to tween to a different colour at the same time.
I have got it to work kind of the problem is that the lights don’t tween at the same time the game tweens one light then the next and repeats this until all lights have been tweened.
I have tried a few things from different posts, but they all have the same issue.
This is the code I am using:
for Index, Child in pairs(game:GetService("Workspace"):GetChildren()) do
if Child.Name == "Light" then
local Info = TweenInfo.new(0.5, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false, 0)
local Color = {Color = game.ReplicatedStorage.Events.Lights.Color.Value}
local ChangeColor = TweenService:Create(Child.Light.Light, Info, Color)
wait()
ChangeColor:Play()
end
end
Any help would be much appreciated!