I am attempting to do a jetpack, however it is not among those “where her camera looks the goes” jetpack. Ns am do the efforts to do a jetpack the would always (if activated) go up in a 120 angle. The camera would certainly still be used to dictate which way the player would go, yet not the angle.

You are watching: How to fly a jetpack in roblox

I right now do not know just how to attain this goal. I just want the jetpack (if activated) come contanstly elevator the players on a 120 angle. And also the player could readjust the directions of where he is walk (obviously) through his camera. I do not know exactly how to combine these two things.

I went through numerous dearteassociazione.org tools, even on the brochure section. However all of them space those type of jetpacks that will certainly basically permit you fly in any kind of direction and also on any angle. I carry out not want this.

Help is appreciated.

\"*\"


You’ll most likely want to take a look at VectorForce or experiment about with them. If you deconstruct the problem and also look at the goal (making football player glide upwards), I’m sure this could help you rather a bit.

In regards to utilising the VectorForce, I would assume that you desire something family member to the player’s position. You will do it then want to send castle up follow me the forward and up axis (can’t remember what those space - X and also Z?).


Alright therefore assuming you mean 60 degrees up loved one to the prior of the character (120 levels would be paris backwards and up), us can achieve this through a little math.

The equation because that this would be a Unit vector that the direction * a certain force. To acquire the Unit vector you can use: Vector3.new(0,math.sin(math.rad(60)),-math.cos(math.rad(60))).Unit v 60 gift the wanted angle. Currently multiply this by a details Force and also apply it right into a VectorForce in the characters HumanoidRootPart.

Here’s the code I offered in a LocalScript under StarterPlayerScripts:

local character = Player.Character or Player.CharacterAdded:Wait()local HRP = Character:WaitForChild(\"HumanoidRootPart\")local pressure = 3500local VectorForce = Instance.new(\"VectorForce\",HRP)local attachments = Instance.new(\"Attachment\",HRP)VectorForce.Attachment0 = Attachmentwait(3)VectorForce.Force = Vector3.new(0,math.sin(math.rad(60)),-math.cos(math.rad(60))).Unit*ForceLet me understand if you have any much more questions around this


7 Likes
AndreiBernikov (AndreiBernikov) April 27, 2019, 10:12am #4
korky5000:

VectorForce.Force = Vector3.new(0,math.sin(math.rad(60)),-math.cos(math.rad(60))).Unit*Force

At the moment the player just goes up. What I desire is like tilted up so the is still going up yet foward. Carry out you understand what i mean?


AndreiBernikov (AndreiBernikov) April 27, 2019, 10:14am #5

Nevermind, i think I sort of figured that out.Thank friend so much :))


AndreiBernikov (AndreiBernikov) April 27, 2019, 10:28am #6

Another question, just how would ns make the force constant. In ~ the moment it is like the player is jumping simply really high and also eventually heaviness pulls the down. I want the player come constantly be relocating on the angle range until the script tells the player to stop.

See more: Harry Potter Song Snape Snape Severus Snape Lyrics, The Mysterious Ticking Noise (Song)


korky5000 (korky5000) April 27, 2019, 5:39pm #7

Just rise the “Force” variable!

local force = 5500

Could be any variety of your preference.


tdgog (tdgog) July 27, 2020, 11:50am #9

I’m trying to make a comparable system. Exactly how did you do it tilted so the the character is moving up and also forward?