ApplyImpulse on the right direction

I plan on using ApplyImpulse() on my character’s humanoidrootpart to push it around, I want it to push my character to the direction it’s currently facing but I’m not sure how to set the ApplyImpulse in that manner (as in adjusting X or Z)

you probably could do something like this, maybe?

-- Assuming you already have a humanoidrootpart variable
local offset = 20
local offsetcframe = humanoidRootPart.CFrame + humanoidRootPart.CFrame.LookVector * offset

humanoidRootPart:ApplyImpulse(offsetcframe.Position * humanoidrootpart.AssemblyMass)

I tried both your script and something similar to that, it should move the character to the direction that it’s facing but your script only moves it in the Z axis

Removed the offset and did a few changes it works now thx

1 Like