Stop The Function

local connections = {}
coroutine.wrap(function()
		if roundType == "Banana" then
			local players = game.Players:GetChildren()
			for i = 1,#players do
				if players[i].Character ~= nil then
					connection[player] = players[i].Chatted:Connect(function(msg)
						if msg == "banana" then
							print("Im an epic banana")
						end
					end)
				end	
			end
		end
	end)()

------
-- at the end of your while loop

for _,con in pairs(connections)do
   con:Disconnect()
end

my guy I don’t know what you are talking about, I don’t think you understand the problem here.