Problems with LinearVelocity moving slightly to the right and into the ground

What is the issue?
Using a LinearVelocity inside my game will move the players character into the ground slightly and to the right.

What solutions have you tried so far?
I’ve tried setting AssemblyLinearVelocity to Vector3.new(0,0,0) however problem still persists.


.

Could I see a snippet of the code?

More specifically, if you have a CFrame.LookVector in your code.

local push = Instance.new(“LinearVelocity”, hrp)
push.Attachment0 = hrp.RootAttachment
push.MaxForce = 100000
push.RelativeTo = Enum.ActuatorRelativeTo.Attachment0
push.VectorVelocity = Vector3.new(0,0,-forwardPush)

Try this:

push.VectorVelocity = hrp.CFrame.LookVector;

it just doesnt work .,…

Sorry, try this instead:

local speed = 30; -- adjust to your liking
push.VectorVelocity = (hrp.CFrame.LookVector) * speed;

this moves the player, but they consistently go in random directions

Could I see a video of this if possible?

nvm i found the solution. thank you for your help

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.