Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do i make it so when a sound ends this script waits 5 seconds?

local sound = game.Workspace.Sound local beats = 0 local maxLoudness = 510 local count = game.Workspace.BPM.SurfaceGui.TextLabel

game:GetService("RunService").RenderStepped:Connect(function() local loudness = sound.PlaybackLoudness if loudness > maxLoudness then beats = beats+1 end end)

local function getAverageBpm() local minutesElapsed = sound.TimePosition/60 return beats/minutesElapsed end while wait(0.001) do count.Text = getAverageBpm()

end

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.