Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local bar = owner.Character.Head
- local sound = Instance.new("Sound", owner.Character.Head)
- sound.SoundId = "rbxassetid://301964312"
- sound.Looped = true
- sound:Play()
- -- define a max loudness
- local maxLoudness = 30
- -- animate the amplitude bar
- while true do
- local amplitude = math.clamp(sound.PlaybackLoudness / maxLoudness, 0, 1)
- bar.Size = Vector3.new(0, 1, 0)
- wait(0.05)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement