----- SEATS -----


for _, v in pairs(seats) do
	v.ChildAdded:Connect(function(obj) -- added
		if obj.Name == "SeatWeld" then
			local player = game.Players:GetPlayerFromCharacter(obj.Part1.Parent)
			if player then
				table.insert(occupants, obj.Part1.Parent)
			end
		end
	end)
	v.ChildRemoved:Connect(function(obj) -- removed
		if obj.Name == "SeatWeld" then
			local player = game.Players:GetPlayerFromCharacter(obj.Part1.Parent)
			if player then
				for i, occupant in pairs(occupants) do
					if occupant == player then
						table.remove(occupants, i)
					end
				end
			end
		end
	end)
end

