When tweening color for a dance floor, I found a weird occurrence that would happen whenever the color of the dance floor would turn to red. Yellow blocks would appear on the screen which leads me to believe that it is caused by a bug in future lighting as it would not happen otherwise.
You can see an example of what is happening here.
https://i.gyazo.com/160c1660507bb1f035716d8686879391.mp4
Here is the source code to reproduce:
local audio = game.Workspace.Audio:WaitForChild("AudioLoop").Sound
local FadeInfo = TweenInfo.new(
0.05, -- Duration
Enum.EasingStyle.Linear, -- Style
Enum.EasingDirection.Out, -- Direction
0, -- Repetition
false, -- Reversal
0 -- Delay
)
spawn(function()
while wait(0.1) do
local lastsize = audio.PlaybackLoudness/1000
for i,v in pairs(workspace.SoundResponsive:GetChildren()) do
if v.Name == "Surface" then
delay(0.1, function()
local FadeGoal1 = {Color = Color3.fromHSV(lastsize, 1, 1)}
local FadeTween1 = game:GetService("TweenService"):Create(v, FadeInfo, FadeGoal1)
FadeTween1:Play()
end)
elseif v.Name == "Spot" then
delay(0.1, function()
local FadeGoal1 = {Color = Color3.fromHSV(lastsize, 1, 1)}
local FadeTween1 = game:GetService("TweenService"):Create(v.SpotLight, FadeInfo, FadeGoal1)
FadeTween1:Play()
end)
end
end
end
end)