How Do I Make My Helicopter Hover?

Hi there. I have a helicopter that is supposed to hover. This is how it supposed to work. When I press Q it goes down, when I press E then it should go up, and when I release the key it should hover.

This is what happens:

Every thing in the helicopter except the forward and steer block are set to massless.

game:GetService("ReplicatedStorage").MoveHeli2.OnServerEvent:Connect(function(player, input)
	local mass = script.Parent.Parent.Steer:GetMass()
	for i, v in pairs(player.Character:GetChildren()) do
		if v:IsA("BasePart") or v:IsA("MeshPart") then
			mass = mass + v:GetMass()
		end
	end
	wait()
	if input == "Q" then
		script.Parent.Parent.Steer.Up1.Force = Vector3.new(workspace.Gravity / mass, 0, 0)
		script.Parent.Parent.Forward.Up.Force = Vector3.new(workspace.Gravity / mass, 0, 0)
	end
	if input == "E" then
		script.Parent.Parent.Steer.Up1.Force = Vector3.new(workspace.Gravity * mass * 1.1, 0, 0)
		script.Parent.Parent.Forward.Up.Force = Vector3.new(workspace.Gravity * mass * 1.1, 0, 0)
	end
	if input == "Stop" then
		print("hi")
		script.Parent.Parent.Steer.Up1.Force = Vector3.new(workspace.Gravity * mass, 0, 0)
		script.Parent.Parent.Forward.Up.Force = Vector3.new(workspace.Gravity * mass, 0, 0)
	end
end)
1 Like

Wait so whats the problem. In the video it looks like its just staying in place?

If you look closely it doesn’t stay in place.

Whenever I press E once, the helicopter goes up. When I release the key the helicopter keeps on going up and doesn’t stop.

You can use InputEnded to check when they stop holding Q.

I did that. There problem is with body movers.

I solved this. I used a offest which I added to the force.