Issues with FlightSystem [ Changed Title ]

Hi, I’m currently creating a FlightSystem - The NetworkOwner is set whenever the Player enters the seat. However, since I implemented this I’m having issues with my Warp System?

All parts are joined together using WeldConstraints - The warp works by Tweening the RootPart of the ship from point A to point B, however as shown below, I’m having an issue with this.

The RootPart is the parent of all BodyMovers & an ordinary weld [This is to help with the tilting effect.] - The RootPart is connected to the BasePart in which all other parts are welded to.

The Red block is the Root, and as shown it seems to appear at the destination before the rest of the ship which then follows.

https://gyazo.com/8882a3e67f6a8b8f8bfb4c75ebec28fe

Warp Code
local System = {}
local Warp_Point
------------------
------------------
function Tween(Obj, Time, Style, Properties)
	game.TweenService:Create(Obj, TweenInfo.new(Time, Style), Properties):Play()
end
------------------
------------------
function System.Configure(Compiled)
Warp_Point = workspace:WaitForChild("Warp_Point_A")
	
	Compiled.Values.isWarping.Value = true
	
	Compiled.BodyMovers.BodyAngularVelocity.AngularVelocity =
		Vector3.new(0, 0, 0)
	
	Compiled.BodyMovers.BodyVelocity.Velocity =
		Vector3.new(0, 0, 0)
		
	Tween(Compiled.Sections.Exterior["Root"]["Tilt"], .5, Enum.EasingStyle.Linear, 
		{C0 = CFrame.fromEulerAnglesXYZ(0, 0, 0)})
		
	Compiled.BodyMovers.BodyGyro.MaxTorque =
		Vector3.new(math.huge, math.huge, math.huge)
	
	Compiled.Sections.Exterior["Root"]["BodyGyro"].CFrame =
		CFrame.new(Compiled.Sections.Exterior["Root"].CFrame.p, 
			Vector3.new(Warp_Point.Position.X, 
				Compiled.Sections.Exterior["Root"].Position.Y, Warp_Point.Position.Z))
	
	wait(1)
	
	Tween(Compiled.Sections.Exterior["Root"], .5, Enum.EasingStyle.Linear, 
		{Position = Vector3.new(Warp_Point.Position.X,
			Compiled.Sections.Exterior["Root"].Position.Y, Warp_Point.Position.Z)})
	
	wait(.5)
	
	Compiled.Values.isWarping.Value = false
	
	Compiled.BodyMovers.BodyGyro.MaxTorque =
		Vector3.new(math.huge, 0, math.huge)
end
------------------
------------------
return System

Can you describe what’s happening a bit more? It’s hard to understand the issue from the video.

1 Like

The intended idea is for the ship to move from point A to B in one single piece.

However, as shown in the video, the ship seems to vanish - The root appears before the rest of the ship and then the other pieces of the ship are shown to follow.

So his problem here is that the rest of the ship. All the other parts which doesn’t have those body movers in them. Doesn’t go along with the rootpart. I suggest that you make sure the network owner is the actual issue here and tell us how you came to that conclusion.

1 Like

Located the issue but unsure how to patch it:

After removing the initial flight mechanic, it seems to work fine.
However, I’m having a hard time actually depicting the issue.

https://gyazo.com/4b14c19d9d43a77be31202407995542a

Full Flight Code
local System = {}
local Player
------------------
------------------
function Tween(Obj, Time, Style, Properties)
	game.TweenService:Create(Obj, TweenInfo.new(Time, Style), Properties):Play()
end
------------------
------------------
local FlightGui = script.Parent:WaitForChild("FlightGui"):Clone()

function System.Configure(Compiled)
	Compiled.Sections.Interior["Pilot"].Changed:Connect(function(Prop)
		if Prop == "Occupant" then
			
			local Humanoid = Compiled.Sections.Interior["Pilot"].Occupant
			if Humanoid then
			Player = game:GetService("Players"):GetPlayerFromCharacter(Humanoid.Parent)
			FlightGui.Parent = Player.PlayerGui
			FlightGui:WaitForChild("Trigger"):FireClient(Player, Compiled)
			else
			FlightGui.Parent = nil
			end
			
		for _,Parts in pairs (Compiled.Sections.Exterior:GetDescendants()) do
			if Parts:IsA("BasePart") then
				if Humanoid then
				Parts:SetNetworkOwner(Player)
				else
				Parts:SetNetworkOwner(nil)
				end
			else end
		end
			
		end
	Flight(Compiled)
	end)
end
------------------
------------------
local Speed = 50

function Flight(Compiled)
local PilotSeat = Compiled.Sections.Interior["Pilot"]

	--[[while System do wait()
		if Compiled.Values.isWarping.Value == false
		and Compiled.Values.Health.Value > 0 then
		
		if (PilotSeat.Throttle == -1) then
		Compiled.BodyMovers.BodyVelocity.Velocity = 
			Compiled.Sections.Exterior["Root"].CFrame.LookVector * -Speed / 5
			
		elseif (PilotSeat.Throttle == 0) then
		Compiled.BodyMovers.BodyVelocity.Velocity = Vector3.new(0, 0, 0)
		
		elseif (PilotSeat.Throttle == 1) then
		Compiled.BodyMovers.BodyVelocity.Velocity = 
			Compiled.Sections.Exterior["Root"].CFrame.LookVector * Speed
		end
		
		if (PilotSeat.Steer == -1) then
		Compiled.BodyMovers.BodyAngularVelocity.AngularVelocity = 
			Vector3.new(0, 1, 0)
				Tween(Compiled.Sections.Exterior["Root"]["Tilt"], .5, Enum.EasingStyle.Linear, 
					{C0 = CFrame.fromEulerAnglesXYZ(0, 0, math.rad(15))})
		
		elseif (PilotSeat.Steer == 0) then
		Compiled.BodyMovers.BodyAngularVelocity.AngularVelocity = 
			Vector3.new(0, 0, 0)
				Tween(Compiled.Sections.Exterior["Root"]["Tilt"], .5, Enum.EasingStyle.Linear, 
					{C0 = CFrame.fromEulerAnglesXYZ(0, 0, 0)})
		
		elseif (PilotSeat.Steer == 1) then
		Compiled.BodyMovers.BodyAngularVelocity.AngularVelocity = 
			Vector3.new(0, -1, 0)
				Tween(Compiled.Sections.Exterior["Root"]["Tilt"], .5, Enum.EasingStyle.Linear, 
					{C0 = CFrame.fromEulerAnglesXYZ(0, 0, math.rad(-15))})	
		end
	 
		end
	end]]--

end
------------------
------------------
return System

Diagnosed the issue but still clue on how to resolve this.
It seems to be that whenever the Tweening is introduced, the issues begin.

FIXED
Fixed this by using a BodyPosition as opposed to Tweening a part of the Ship.

1 Like