I tried to make volume bar but loudness is always 0 even music is playing, what’s wrong?
local volbarOn = false
volbar.OnServerEvent:Connect(function(user)
local volbarGui = nil
if volbarOn == false then
volbarOn = true
if volbarGui == nil then
volbarGui = script.volumeBar:Clone()
volbarGui.Parent = nomGui
end
repeat
if currentsong ~= nil then
volbarGui.Text = currentsong.PlaybackLoudness
volbarGui.Size = UDim2.new(0, volbarGui.Size.X, 0, (30 + currentsong.PlaybackLoudness / 0))
end
wait()
until volbarOn == false
else
volbarOn = false
volbarGui:Destroy()
end
end)