#trying to add a forward boost system
17 messages · Page 1 of 1 (latest)
Im having a hard time explaining, but when you press the E key, I want the player to be thrown up a few studs, and at the same time thrown forward, like a forward boost, instead of a vertical one
I essentially want the player to be thrown up, and forward, as if they pushed themself off an object
Use a linear velocity in the hrp attachment
The documentation for Linear Velocity I struggle with, do you have a brief example?
Yes of course
Basically when you create a linear velocity, you can give it an attachment and a body force
So it will start from the attachment and create a vector from the attachment
So for example doing
local mov = Instance.new("LinearVelocity", hrpAttachment)
mov.Attachment0 = hrpAttachment
local FORCE = 30
mov.Force = hrp.LookVector * FORCE + Vector3.Y * FORCE
Debris:AddItem(1, mov)
Out of curiosity, what's the very bottom line?
Debris:AddItem(1, mov)
I believe I understand the rest, assuming that hrpAttachment is just a reference to the humanoid root part
No it's an attachment inside of the humanoid root part
Cause hrp is a basepart
And mov.Attachment0 expect a part
This creates a debris, which basically remove the element after a given n amount of seconds
okay, im gonna try to apply the knowledge here, see what I can get
update, i havent made it anywhere