I can’t see why this error is popping up:
Script:
--- [ Victory Sound ] ---
local WinSound = Podium.Misc.PodiumSounds.Win:GetChildren()[math.random(1, #Podium.Misc.PodiumSounds.Win:GetChildren())]
-- Configuration
WinSound.Volume = 0
-- Tween Sound
TweenService:Create(WinSound, TweenInfo.new(4, Enum.EasingStyle.Linear), {Volume = 5}):Play()
WinSound:Play()
-- Fades Sound Before It Ends
task.spawn(function()
while WinSound.IsPlaying do
if WinSound.TimeLenght and WinSound.TimePosition then
local RemainingTime = WinSound.TimeLenght - WinSound.TimePosition
if RemainingTime <= 5 then
TweenService:Create(WinSound, TweenInfo.new(4, Enum.EasingStyle.Linear), {Volume = 0}):Play()
break
end
else
task.wait(0.2)
end
end
TweenService:Create(WinSound, TweenInfo.new(4, Enum.EasingStyle.Linear), {Volume = 0}):Play()
end)