How can I do something to the player when they exit a part?

I have a part that will cause players to fly up when they are inside, and fall back down when they exit the part.

I have the enterance part covered as Im using GetTouchingParts() paired with touchinterest to get all the players within the part. however the challenge for me is to do something to that player when they are no longer inside the part, how can I do this?

here is what I have so far:

local cs = game:GetService("CollectionService")
local swimminglist = {}

function handlegravitypool()
	for _, p in pairs(cs:GetTagged("AquaticDesert")) do
		local pool = p:FindFirstChild("GravityPool")
		pool.Pool.Touched:Connect(function()end)
		
		local parts = pool.Pool:GetTouchingParts()
		for _, p2 in next, parts do
			if not swimminglist[p2] and p2:IsA("BasePart") and p2.Parent:FindFirstChild("Humanoid") then
				print("inside")
			swimminglist[p2] = p2.Parent.PrimaryPart
			end
		end
		
	end
end


while true do
	wait(1)
handlegravitypool()
end

You can also get all players and their characters in the workspace instead. Check if one of their character’s part touches this “fly” part, and let these fly up then, and others not.

for i, plr in pairs(game.Players:GetPlayers()) do
      local char = plr.Character
      if char ~= nil then
      local humanpart = char:WaitForChild("HumanoidRootPart")
      local connection = pool.Pool.Touched:Connect(function()end)
      local allowed = false
      for i, flypart in pairs (humanpart:GetTouchingParts()) do
         if flypart.Name == "TheNameOfYourFlyPart" then
             allowed = true
             end
         end
         connection:Disconnect()
         if allowed == true then
        --let player fly
        else
        --dont let player fly
    end
end
end