Hi all,
I have made a rolling system, but it does not go as smooth as I’d like it to go. In the following video, my character falls on the third roll.
Despite the fact that I have disabled falling down for players, it still happened:
Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Ragdoll,false)
Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.FallingDown,false)
(ServerScript, StarterCharacterScripts)
This is how the rolling works:
local BV = Instance.new("BodyVelocity")
BV.MaxForce = Vector3.new(100000, 0, 100000)
BV.P = math.huge
BV.Velocity = direction * 50
BV.Parent = chr.HumanoidRootPart
game.Debris:AddItem(BV, 0.25)
(Localscript)
The variable direction
is either a lookVector or a rightVector depending on the direction the player is walking towards.
How can I solve this? Should I use LinearVelocity
instead of the deprecated BodyVelocity
, if that makes any difference at all?
Thanks in advance.