Touched function is going through multiple times even with a debounce

no, it would atleast end up at 13 seconds and even if it was 0 seconds, the function wouldn’t go into place as

this would return false.
Here’s another part of the script that would help explain a bit:

local currentlights = {
	["Group1"] = "Green",
	["Group2"] = "Red"
}

local redtimelight = {
	["Group1"] = 0,
	["Group2"] = tick()
}

local greent = 13
local yellowt = 2
local redt = 13

function changecolor(color, light)
	local TrafficLight = light
	local RedLight = TrafficLight.RedLight
	local YellowLight = TrafficLight.YellowLight
	local GreenLight = TrafficLight.GreenLight
	local RedPointLight = RedLight.PointLight
	local YellowPointLight = YellowLight.PointLight
	local GreenPointLight = GreenLight.PointLight
	
	local group
	
	if table.find(group1, light.Parent) then
		group = "Group1"
	elseif table.find(group2, light.Parent) then
		group = "Group2"
	end
	
	if color == "Green" then
		currentlights[group] = color
		RedLight.Transparency = 0.8
		RedPointLight.Enabled = false
		GreenLight.Transparency = 0
		GreenPointLight.Enabled = true
	elseif color == "Yellow" then
		currentlights[group] = color
		GreenLight.Transparency  = 0.8
		GreenPointLight.Enabled = false
		YellowLight.Transparency = 0
		YellowPointLight.Enabled = true
	elseif color == "Red" then
		currentlights[group] = color
		redtimelight[group] = tick()
		YellowLight.Transparency = 0.8
		YellowPointLight.Enabled = false
		RedLight.Transparency = 0
		RedPointLight.Enabled = true
	end
end