Hey,

So I'm trying to make a rocket land once it's been launched, and I'm having troubles slowing it down. When the rocket begins to land, I let the rocket free fall. It picks up speed, and when it hits a certain altitude, I turn on the after burners (turn on my bodymovers again). I do this to help slow down the rocket so it's able to safely and calmly land itself. I'm using local GravityForce = Vector3.new(0, (-Rocket.BoosterBody:GetMass() * workspace.Gravity), 0) so it allows me to set the force that will counteract the high falling speeds, this was given to me by a friend.

My issue is, when it hits the altitude to turn on the afterburners, my equations and what I'm doing to help slow down the rocket aren't working, it just slams down into the ground really fast. Anyway I can slow down the rocket so I'm able to calmly and safely land this thing?

launch.OnServerEvent:Connect(function(plr)
	
	FireParticle.Enabled = true
	
	for i = 1000000, 10000000, 500 do
		wait()
		BodyThrust.Force = Vector3.new(0, i, 0)
		if (i == 1300000) then
			breakOffStage()
			break
		end
	end
	
	local GravityForce = Vector3.new(0, (-Rocket.BoosterBody:GetMass() * workspace.Gravity), 0)
	
	print(GravityForce)
	
	Conn = rService.RenderStepped:Connect(function()
		local Dist = (Rocket.BoosterBody.Position.Y - LandingTarget.Position.Y)
		print(Rocket.BoosterBody.Velocity)
		if Dist <= 7500 then
			BodyThrust.Force = Vector3.new(0, GravityForce * 1.5, 0)
			print(BodyThrust.Force)
		else
			print(false)
		end 
	end)
	
end)

2 comments

0

RenderStepped is client sided.

0

Is that the issue tho? I tried heartbeat before, and that didn't fix the issue either.