apply impulse pushes player too forcefully if they jump during/prior
no jump:
jump:
code:
CONNECTION = game:GetService("RunService").RenderStepped:Connect(function(DELTA_TIME)
---------------------
if HOLDING_A then
DIRECTION = -(workspace.CurrentCamera.CFrame.RightVector)
elseif HOLDING_D then
DIRECTION = (workspace.CurrentCamera.CFrame.RightVector)
end
---------------------
if DIRECTION ~= nil then
CHARACTER.HumanoidRootPart:ApplyImpulse((DIRECTION * 15 * m_(CHARACTER)))
end
end)
if you use ChangeState to set the humanoid state to physics before applying impulse then it will fling the same distance when its in the air or on the ground
when you set the state to physics the character will fall over you can use AlignOrientation to keep the character upright while its in physics mode
OP would have just instanced a LinearVelocity into the player character’s primarypart with the velocity in the direction of the jump and removed it after a brief burst.
kinda, i used the same logic for the impulse, i put it in a runservice loop and deleted it after ~0.15 seconds, works the exact same but friction wont slow it down this time
I also recommend setting the bodymover’s velocity to zero (i.e. Vector3.zero) right before destroying it. This was mainly the case with BodyVelocity where there’d still be inertia left even after destroying it, but since LV uses constraints I don’t think that should be the case.