Notification Cooldown not working

So I’m still trying to work on a better, more convenient anti wall clipping message where if you were to touch a part, it would remind you not to. I’ve moved on from GUI to the default roblox notifications.

I’ve tried to add a wait to the notification because its reminding you for every like millisecond that you’re touching the part for, I added it, but its still not working for some reason, I tried to make it remind you every 5 seconds that you’re on the part for but its still not working :confused:

local startergui = game:GetService("StarterGui")
local notif = {
	"Please refrain from wall-clipping into prohibited areas.",
	"Wall-clipping is strongly prohibited, especially in staff only areas.",
	"Wall-clipping into prohibited areas are bannable/punishable. Please avoid it, thank you!"
}

local detection = workspace.WallClippingDetection.DetectionPart
local deb = false

detection.Touched:Connect(function()
	
	for i = 1, #notif do
		local notifications = notif[i]

		startergui:SetCore("SendNotification", {
			Title = "Reminder",
			Text = notifications,
			Duration = 5
		})
		wait(5)
	end
end)
detection.Touched:Connect(function()
	if deb == false then deb = true
	for i = 1, #notif do
		local notifications = notif[i]

		startergui:SetCore("SendNotification", {
			Title = "Reminder",
			Text = notifications,
			Duration = 5
		})
		wait(5)
    end
    deb = false
    end
end)