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

How to make a animation speed play along the music?

I've been wanting to make this for a while and can't figure out how to do it. I search up so many things, and asking for help but I couldn't find the answer. I'm trying to make a player animation change the animation speed along with the music. (for ex. quiet music = slow animation. Loud music = fast animation)

Here's a reference if you don't get what I'm saying: https://tenor.com/view/roblox-smug-dancing-gif-14853673

script:

game.Players.PlayerAdded:connect(function(player)
    while not player.Character do wait()end
    local character=player.Character
    local animateScript=character.Animate
    animateScript.idle.Animation1.AnimationId="http://www.roblox.com/asset/?id=2763338387"
animateScript:AdjustSpeed (1) workspace.Sound.PlaybackLoudness * .05
end)

^I'm a 100% sure that's incorrect but idk! btw it's in a script in serverscriptservice

1 comment

0

OH, your the minecraft player, on a roblox lua website. https://gyazo.com/67fc1daeaa78b07f32c4a8bfa84926bd

1 answer

✓ Accepted answer

PlayBackLoudness only works in a localscript.

nameOfAnimationTrack:AdjustSpeed(1/(sound.PlaybackLoudness / 1000))

2 comments

0

Where do i put the localscript?

0

in startercharacterscripts

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