Smooth player animations & movement (r6)

Hey there,
I’ve been doing a bit of research and I am at a loss with the available resources I’ve found.
I was wondering how you would be able to create smooth player movement, such as having momentum build up slowly when a player is walking and increase even further when sprinting as well as how the animation would speed up / change along with it.

I’m also curious about if I can put custom footstep sfx somewhere within this or if I would work on that else where. I would just like either a bit of guidance in the right direction or a piece of example code to showcase what I am meant to do or can build off as I’ve never worked with this stuff before.

Cheers

How about changing the WalkSpeed in a loop slowly higher?

Yeah that would probably work but I don’t know where to put it as well as how to make the animation speed up with the player WalkSpeed and then change to sprinting after it reaches another speed.

If you want to achieve smoothness (regarding animations) you can simply just mess around with animation weight/speed to achieve smoothness.

I’ve never been aware of these because animation is the one part of studio I’ve never really touched so it sounds like a good step in the right direction!
How would I go about changing those? Would this cover movement animations currently being played?

So if you dont have a custom animation, then you can simply just change the WalkSpeed in the properties of a players humanoid. Roblox will adjust their WalkAnimation to the WalkSpeed set

Yeah, I do have a custom animation though.

Ig you can work with the PlaySpeed (or PlaybackSpeed idk atm) and just adjust them correctly to the WalkSpeed.

if you want a custom animation to speed up relative to your walkspeed just divide your current walkspeed by the default walkspeed you have set for your game.

Momentum? You could make a vector that lerps to the Humanoid’s MoveDirection and then make the Humanoid move towards the vector using Humanoid:Move(). Atleast that’s how I do it.

Ah yeah this is what I was seeing a lot, I might give that a try when I can and see if I can figure it out.
Got any examples or guidance to give me before I try make it?

Yeah that sounds good I will give that a try as well, any extra info I might want to know?

Not really, just use a RenderStepped and a predefined Vector3 called Vector or whatever you wish to call it, then lerp the value. I’d also make the deltaTime apply for people that use an fps unlocker by doing:

--[[
deltatime is the value u get from renderstepped,
we're restricting it to specifically 1 and below, because applying 2 or above
to the alpha does some weird jittering and such.

you'd do all this code in RenderStepped.
]]
DeltaTime = math.min(DeltaTime * 60, 1)
Vector = Vector:lerp(Humanoid.MoveDirection, 0.1 * DeltaTime)
Humanoid:Move(Vector)

Have you looked into the usage of Animation PlaybackSpeed? You could try this.

I figured it out!
I used the Renderstepped code to create the gradual movement and then went into the Roblox Animate script and simply adjusted the animation speed from there.
Thank you everyone who replied!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.