Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How to make a animation speed play along the music?

Asked by 5 years ago

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

0
OH, your the minecraft player, on a roblox lua website. https://gyazo.com/67fc1daeaa78b07f32c4a8bfa84926bd BashGuy10 384 — 5y

1 answer

Log in to vote
2
Answered by
royaltoe 5144 Moderation Voter Community Moderator
5 years ago
Edited 5 years ago

PlayBackLoudness only works in a localscript.

nameOfAnimationTrack:AdjustSpeed(1/(sound.PlaybackLoudness / 1000))
0
Where do i put the localscript? Mel_pro1 5 — 3y
0
in startercharacterscripts royaltoe 5144 — 3y
Ad

Answer this question