Advertisement
Prephy

Untitled

Dec 4th, 2020 (edited)
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. local bar = owner.Character.Head
  2. local sound = Instance.new("Sound", owner.Character.Head)
  3. sound.SoundId = "rbxassetid://301964312"
  4. sound.Looped = true
  5. sound:Play()
  6.  
  7. -- define a max loudness
  8. local maxLoudness = 30
  9.  
  10. -- animate the amplitude bar
  11. while true do
  12. local amplitude = math.clamp(sound.PlaybackLoudness / maxLoudness, 0, 1)
  13. bar.Size = Vector3.new(0, 1, 0)
  14. wait(0.05)
  15. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement