Help scripting a custom animation!

Hello Forum! I couldn’t find an answer to this, so I decided to make a forum post to ask for help.

I recently created a game and I decided to add custom animations so I did it a simple way and clicked play in Roblox studio and then clicked myself in the workspace and then copied the “animations” script and put it into StarterCharacterScripts or whatever it is called, that may be wrong, but I then just put the animation ID into the script and one other thing and it allowed me to use my walk animation.

It works well, but when I increase the game’s default player speed, the character’s animation is too slow for how fast he is moving. Is there a way to make it so the animation’s speed, especially the legs, move faster when the speed is increased just like the default Roblox walk animation?

You can use the function AnimationTrack:AdjustSpeed to change the AnimationTrack.Speed property of an animation.

Could you write that into a script and tell me where that would go possibly?