I stumbled upon :ApplyImpulse(Vector3) on a forum post, and tried it, but it didn’t work, so I looked up the roblox documentation for it. This is what it says:
This function applies an instant force impulse to this part's assembly.
The force is applied at the assembly's center of mass, so the resulting movement will only be linear.
The resulting velocity from the impulse relies on the assembly's mass. So a higher impulse is required to move more massive assemblies. Impulses are useful for cases where you want a force applied instantly, such as an explosion or collision.
If the part is owned by the server, this function must be called on a server Script. If the part is owned by a client, this function can be called on a LocalScript or server Script.
It gives no script examples, and is pretty minimal in its explanation.
This was my code to try and launch my character backwards:
local backwardsVelocity = -(plr.Character.HumanoidRootPart.CFrame.LookVector * 2);
plr.Character.HumanoidRootPart:ApplyImpulse(backwardsVelocity);
At first, I thought I wasn’t applying enough force, so I tried:
local backwardsVelocity = -(plr.Character.HumanoidRootPart.CFrame.LookVector * 200);
plr.Character.HumanoidRootPart:ApplyImpulse(backwardsVelocity);
When this didn’t work, I started to get triggered, and used math.huge instead:
local backwardsVelocity = -(plr.Character.HumanoidRootPart.CFrame.LookVector * math.huge);
plr.Character.HumanoidRootPart:ApplyImpulse(backwardsVelocity);
To be honest, I actually expected this to finally work—but alas, my character hasn’t moved an inch. Am I doing something wrong?
As far as I remember when I tried using it, using it after I jumped actually worked, you should try that too. Anyways the best alternative to this problem is simply to add velocity to the part’s AssemblyLinearVelocity.
Type in to Google “how to calculate force for applyimpulse Roblox” to correctly apply impulse you have to first calculate the force and multiply it by the assembly mass…
First, I set the networkowner to the server, then unanchored the HumanoidRootPart on the server, in case the game thought it was anchored.
Second, I multiplied the direction of the CFrame.LookVector by math.huge, so there’s no room for calculation error. My character didn’t move whether I used math.huge or not. I just used AssemblyLinearVelocity in the end, which was a mediocre solution.