Lerping HRP for RootMotion

Hi (:

Currently I have a system that tweens your HRP (on the client) because I need to implement Root Motion. However, when replicating to other clients it looks… really awful. In an ideal world, I would fire to the server to tell it to play the tween all the other clients and then update the final CFrame of the HRP on the server. As far as I am aware there’s not really a way for me to bypass Roblox replicating Tweens of the player (if there is pls lmk) so now I am trying to lerp the HRP instead.

I’ve had a headache all day trying to figure out lerping, but I can’t for the life of me. I need it to lerp the HRP at certain keyframes in an animation for every frame and I know I need to use RunService/RenderStepped but can’t figure it out.

If anyone could give me just some skeleton code or guidance on how to do it I’d be so grateful

1 Like

dont use lerp. it doesnt account for gravity and collision. use a heartbeat based system or Humanoid:Move

i have already made a rootmotion plugin so thats probably the best way

1 Like

for what I needed I didn’t need to account for gravity or collision, it was for a gymnastics/tumbling system. I settled on tweens in the end! :slight_smile:

1 Like