Plane Take Off Issue

I have an issue with a plane I’m creating.
It seems to tip forward, but it used to tip backward.

I changed some PhysicalProperties of the front wheel (which steers), but instead of fixing it, the plane now tips forward
There is an .rbxl (mostly so you can see the constraint configuration) with the plane I am working with and a video showing errors. You CANNOT set the motor Attachment
to one of the base.

Note: The front wheel needs to have enough friction to make the plane turn to speeds up to about 160

Here’s some of the code I used, but I’m pretty sure It’s something to do with the motor (LinearVelocity)

-- change the throttle
function PlaneModule:SetSpeed(speed: number)
	if taxi or flying then
		if not run then return end
		motor.Enabled = true
		speed = math.clamp(speed, -reversespeed, maxspeed)
		if speed > 0 then
			speed += speedoffset
		elseif speed < 0 then
			speed -= speedoffset
		end
		motor.VectorVelocity = Vector3.new(0,speed,0)
		updatetorque()
		if speed == 0 then motor.MaxForce = 0 FrontWheel.CustomPhysicalProperties = PhysicalProperties.new(Enum.Material.Plastic)
		else FrontWheel.CustomPhysicalProperties = startprops end
	end
end

task.spawn(function ()
	if fakeaccel then
		local addend = 0
		local speed = 0
		while true do
			if not limp then
				speed = motor.VectorVelocity.Y
				addend = (speed > targetspeed + faspeed - .25 and -faspeed)
					or
					(speed < targetspeed - faspeed + .25 and faspeed) 
					or
					(targetspeed - speed)
				if not occupied then addend = 0 speed = 0 end
				PlaneModule:SetSpeed(speed + addend)
			end
			wait()
		end
	end
end)

task.spawn(function ()
	if throttlebaron then
		while true do
			if not limp and occupied then
				local was = currentthrottle < 0
				currentthrottle += seatthrottle*(currentthrottle >= 0 and throttlechange or backthrotchan)
				local high = reversenable and (was ~= (currentthrottle < 0) and currentthrottle > 0 and 0) or 1
				local low = reversenable and -1 or 0
				currentthrottle = math.clamp(currentthrottle, low, high)
				targetspeed = (currentthrottle < 0 and reversespeed or maxspeed)*currentthrottle
				activedata:FireClient(globalplayer, math.clamp(currentthrottle, 0, 1))

				if not fakeaccel then
					PlaneModule:SetSpeed(targetspeed)
				end
			else
				currentthrottle = 0
			end
			wait()
		end
	end
end)


function PlaneModule:ThrottleChange(throttle: number)
	limp = false
	seatthrottle = throttle
	if seatthrottle == 0 and currentthrottle < 0 then
		currentthrottle = 0
	end

	if not throttlebaron then
		currentthrottle = reversenable and throttle or math.clamp(throttle, 0, 1)
		targetspeed = (currentthrottle < 0 and reversespeed or maxspeed)*currentthrottle
		if occupied then
			activedata:FireClient(globalplayer, math.clamp(currentthrottle, 0, 1))
		end
	end

	if not fakeaccel then
		PlaneModule:SetSpeed(targetspeed)
	end
end

the force is the mass*300

Please Help.

robloxapp-20241029-2130183.wmv (2.1 MB)
Broken Plane.rbxl (64.3 KB)

The plane is completely done, except for this minor issue

If no one can help I might just rework the plane, but I’d rather not.

Figured it out, had to change a minor thing and tweak some code.
Thanks @Userunmanned for the solution

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.