So I have an AI plane and I want the plane to fly towards the player. How can I check if the player is on an Axis of the AI plane?
I’m using a VehicleSeat so it can be easier.
VehicleSeat:GetPropertyChangedSignal("Steer"):Connect(function()
local result = checkFlyPartWeld()
if isOn.Value == true and result == true then
AngularVelocity.AngularVelocity = Vector3.new(AngularVelocity.AngularVelocity.X, -1 * VehicleSeat.Steer, AngularVelocity.AngularVelocity.Z)
end
end)
VehicleSeat:GetPropertyChangedSignal("Throttle"):Connect(function()
local result = checkFlyPartWeld()
if isOn.Value == true and result == true then
AngularVelocity.AngularVelocity = Vector3.new(1 * VehicleSeat.Throttle, AngularVelocity.AngularVelocity.Y, AngularVelocity.AngularVelocity.Z)
end
end)
So how can I make the AI plane fly to the player? Checking if player is on the Axis of the AI plane?