As a Roblox developer, it is currently impossible to apply a large force for a short period of time.
Say I am making something like the gravity gun from half life. I want to apply a huge force for about 0.001 seconds. If we limit the time to 0 and the force to infinity, we could call this an impulse. Right now, what we have to do is apply a force for a single frame, and we have to guess how long the frame will last. This makes for some very high inaccuracy if somebody’s frame lags for an extra 8ms or so, especially, if you rely on this mechanic to be able to throw models at targets and what not.
Specifically, I would like to use this feature to make a gravity gun and hover platforms.
What would be nice is to either have
part:Impulse(origin, impulse)
--or
local i = Instance.new("BodyImpulse", part)--or something
i:Impulse(origin, impulse)
I want to push my character into the air from an explosion. Currently to do this I need to use an attachment + VectorForce then quickly enable then disable the VectorForce. This works but takes too much setup when I only need to use it once and doesn’t give a consistent result every time the force is applied
There should be an method that lets you easily apply a force to a BasePart in any direction thru code without needing to use constraints
workspace.Part:ApplyForce(Vector3.new(0, 100, 0)) --Always uses world space