I’m attempting to cause the character to rise slowly off the ground and into the air.
I want to achieve this through use of the BodyVelocity shown in the attached image.
The vertical MaxForce = 1.1 * total mass of character * workspace.Gravity.
As pictured, the character only begins to rise after losing contact with the ground, either through jumping or walking off an edge. See attached GIF for an example.
With increased force, the character will rise off the ground, but since this amount should be enough, I want to know why it isn’t. The force applied is greater than the force of gravity, so why isn’t the player rising off the ground?
Try setting P to 0. The BodyVelocity might not be reaching the MaxForce you set because of its built in damping through the P property. By setting it to 0 you are disabling damping so it should reach the max force required to get to that velocity less than or equal to the max force specified.
When I set P to 0, the only difference was that there was no perceivable drop after stepping off of the map. No spontaneous ascent began while standing on the ground.
Setting the Humanoid’s PlatformStand to true will allow the character to slowly move up. I’m pretty sure the sticking to the ground thing is something to do with the roblox engine. If you don’t like the player losing the ability to control their character, set PlatformStand to false when the character leaves the ground.
From the background and the issue, I’m assuming you just want the player to rise up when the event is called? If so, couldn’t you just set the velocity of the humanoidrootpart to 100 or 50 going up to make the player move up so the bodyvelocity works? Or you can just CFrame the character up a little if you wanted to give it a boost and make it float.
I’m not sure if this is what you want, but what I do is:
Set the Desired RootPart’s Network Owner to nil inside of a Server script
Create a Body Velocity with a MaxForce of Vector3.new(math.huge, math.huge, math.huge)
Set my Velocity to a given Vector3 constructor value
And that’s all there is to it, once I have deleted my Velocity I set the RootPart’s Network Owner back to the Player.
I don’t change the P Value, because I don’t need to. If I am creating a Knockback with my Combat Systems I just give it a LookVector or UpVector value of the given Target Root Part and multiply that by a certain number, which you can do with the gravity of the workspace probably and adjust some things there.
So I guess you could do although I’m not sure if this is right: BV.Velocity = RootPart.CFrame.UpVector * Mass * workspace.Gravity / Number_Here
Thanks for all the suggestions. I’ll try them out when I get a chance and post what worked.
That makes sense, because it behaves really oddly. If I increase the strength of the BodyVelocity gradually from 1.1 to 1.5, nothing happens, but if I set it straight to 1.5, the character takes right off.
I tried using CFrame at first, but I had to raise the character a full stud off the ground for the floor stick to stop, which got a bit awkward. I’d thought about using Jump or RootPart.Velocity, but the visual effect is kind of strange.
Got it working using PlatformStand, it gave the best results. Thank you!