How check if player is flying the plane or no?

Hello, how can I know if the player is sitting as a pilot flying a plane?
How can this validation be done? :scream:

@PipeSader

Use Seat.Occupant to check if a player is flying it.

If you want to check when the seat occupant changes then do:

Seat:GetPropertyChangedSignal("Occupant"):Connect(function()
     if Seat.Occupant ~= nil then
     -- Stuff here
    end
end)
2 Likes

If the pilot seat is a VehicleSeat, then the property of it known as Occupant, will show the name of whoever is sitting on it.

2 Likes

Thank you guys so much! :smiley: :smiley: