I have a roll script I made, problem is if I try to roll near a slightly taller part (not too tall though) my character doesn’t fall and instead sort of zooms while the BodyVelocity still exists
here’s an example, if the player rolls while on the spawn platform, he’ll fly briefly
this is not a problem on taller cliffs, as the player falls instantly. Only occurs on parts with not a big height difference
This doesn’t really make much sense to me. BodyVelocity works by applying just enough force to maintain a specific velocity. If there’s gravity, it will account for that to keep the velocity straight.
So your character should still move completely horizontal when rolling off a cliff?
Also, I’m not saying that this is the problem, but next time please have consideration on whether or not what you’re using is still being supported by Roblox.
That being said, I think you should be using :ApplyImpulse instead of any sort of bodymover. It just makes more sense since you do push yourself if you try rolling IRL.
Impulse is measured in joules, which is also used to measure momentum. Momentum is calculated by simply multiplying mass with velocity. Based on this, you can make the impulse a specific velocity based on the mass of the player.
Also, you can just repeat the impulse method and have it spread out over a couple frames if it’s too fast doing it all at once. Remember to adjust it for the deltatime though
I’m pretty sure BodyVelocitys have a value called MaxForce which takes in a vector3, set MaxForce to vector3.new(10000,0,10000) – setting the Y value to 0 makes it to where the bodyvelocity cant influence the y