How can I make this Jetpack move more realistic?

Hello! I just recently made my new jetpack for a commission. The guy asked for a jetpack similarly like jailbreaks. Here’s what I made so far.

Far from finished.

Here’s the catch. It moves up only, if you fall, you just land back to the place where you used the jetpack. Here’s a short video.

Another issue that I have is that if I didn’t pickup the jetpack, and just left it there, my jump is higher, not restrained. But if I picked the jetpack, I get restrained. My jump is lessened.

It’s 2 scripts. One client sided, One server sided.

For the server side, It’s used for welding the jetpack to the back of the player (HRP)

JetpackTool.Equipped:Connect(function()
	if JetpackTool.Parent ~= workspace then
		local newweld = Instance.new("Weld")
		newweld:Clone()
		newweld.Name = "WeldTrso"
		local UT = JetpackTool.Parent:WaitForChild("UpperTorso")
		local PP = JetpackTool.Handle

		newweld.C0 = CFrame.new(0, .25, -.6)
		newweld.Part0 = PP
		newweld.Part1 = UT

		newweld.Parent = PP
	end
end)

The client side, It does the UIS, BodyVelocity tweaking.

local Jetpack = script.Parent

local Spaceisheld = false
local JetpackIsEquiped = false
local BodyVelocity = Instance.new("BodyVelocity")
BodyVelocity.Parent = char.HumanoidRootPart
BodyVelocity.Velocity = Vector3.new(0,0,0)
local NeonThingy = Jetpack.Neon


Jetpack.Equipped:Connect(function()
	JetpackIsEquiped = true
	print("equipped!")
end)
Jetpack.Unequipped:Connect(function()
	JetpackIsEquiped = false
	print("unequipped!")
end)

		UIS.InputBegan:Connect(function(input)
			if input.KeyCode == Enum.KeyCode.Space and JetpackIsEquiped == true then
				print("space")
				NeonThingy.Material = Enum.Material.Neon
				BodyVelocity.Velocity = Vector3.new(0,math.random(10,50),0)
			end
		end)
		UIS.InputEnded:Connect(function(input)
		if input.KeyCode == Enum.KeyCode.Space and JetpackIsEquiped == true	 then
			NeonThingy.Material = Enum.Material.ForceField
				BodyVelocity.Velocity = Vector3.new(0,-50,0)
			end
		end)

NOTE: I used Body velocity for this, I’ve been told to by multiple people.

I’ve also heard that the first issue, (Fly, and land on the same spot) can be probably fixed with BodyGyro. I’m pretty moderate with scripting, and I don’t want being spoon fed. Just lead me to the right way.

2 Likes

Maybe when they equip the jetpack, you insert a body force in their Humanoid and set the force using vector 3. Then when they unequip it you destroy the body force.

1 Like

Good idea. Let me change the parent to the humanoid instead of the HRP.

1 Like

Seems it didn’t push me up. It did add the instance into the Humanoid. Question, Did you mean HRP or the Humanoid itself? It Worked tho, Using the HRP Instead.

1 Like

If you want similar to Jailbreak jetpack, I recommend creating an animation.

1 Like

Yes, Im planning to do that, Im more on the movement. I want the jetpack to move naturally, not only upwards.

1 Like

I recommend using BodyTrust.

1 Like

For my jump pad, I put the instance in the Humanoid itself. I think it only works when jumping. Also set the force of the body force

local BodyForce = Instance.new("BodyForce") 
BodyForce.Force = Vector3.new(0, Force You want to go up, 0) -- Its Vector3 so you just adjust it to your own personal favour
BodyForce.Parent = game.Workspace.PlayerName.Humanoid
1 Like

I see. I’ll try to do that for the polishing of the script and effects.

1 Like

also maybe consider using headstackks method for equipping and unequipping the tool. Without the jetpack model’s main part being connected to the right hand, the animation process should be a lot smoother. Here’s a link in case this would benefit you; it’s really easy to implement.

2 Likes

Do things;

  • Check “Massless” to true
  • Check “CanCollide” to false.
  • Destroy or Reparent the Body Velocity

Mass will effect the gravity or mass on your character.
Colliding objects may give your rig some problems.
If you leave a body velocity with properties it can effect your rig.

Also, to fix your only up problem.
You can listen to player input and increase the directional velocity to the move vector of the player’s rig.
Meaning, if they are going forwards, apply x amount of directional force.

1 Like