Im trying to make diving left and right but im not really familiar with forces, and i figured out that bodyvelocity just floats me in a direction, instead, i want the player to receive like an impulse into a direction, like having actual physics, is there any kind of force to achieve this?
use BasePart:ApplyImpulse()
to apply an impulse to a part’s center of mass in object space, for example BasePart:ApplyImpulse(Vector3.new(0, 500, 0))
would cause a part to “jump” in the air
1 Like
player.Character.HumanoidRootPart:ApplyImpulse() -- Vector3: Applies a force in x, y, and z direction
Doesnt work for me, i copy pasted this line of code and put the vector like in the reply above, wont do anything and no errors
doesnt seem to work for me though i followed both instructions
perhaps try applying a larger force.
-- Server Script
-- Make the player character jump up really really high
local forceDir = Vector3.new(0,1000,0)
player.Character.HumanoidRootPart:ApplyImpulse(forceDir) -- assuming 'player' is already defined
Im pretty sure that :ApplyImpulse works depending on network ownership. basically if the networkowner is the server, it’ll run only in a serverscript, and if the networkowner is the client then it’ll run in a localscript