Having trouble with in-game teleporting portals

So Im making a teleporting portal where a GUI Pops up when they are teleporting. But they do teleport but the only issue is, it teleports them back as soon as they arrive to the part.

Door1 Script:

local TeleportationEvent = game.ReplicatedStorage.TeleportationDoorEvent

local Door1 = script.Parent
local Door2 = game.Workspace.TeleportPartCandy

local debounce = false

local cooldown = 8

Door1.Touched:Connect(function(hit)
	
	if hit.Parent:FindFirstChild("Humanoid") then
		wait(cooldown)
		if not debounce then
			debounce = true
			
			local plr = game.Players:GetPlayerFromCharacter(hit.Parent)

			if plr then
				TeleportationEvent:FireClient(plr)
				wait(0.1)
				hit.Parent.HumanoidRootPart.CFrame = Door2.CFrame
				wait(2)
				debounce = false
			end
		end
	end
end)

Door2 Script:

local TeleportationEvent = game.ReplicatedStorage.TeleportationDoorEvent

local Door1 = script.Parent
local Door2 = game.Workspace.TeleportPart1

local debounce = false
local cooldown = 8


Door1.Touched:Connect(function(hit)
	
	if hit.Parent:FindFirstChild("Humanoid") then
		
		if not debounce then
			debounce = true
			
			local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
			
			if plr then
				TeleportationEvent:FireClient(plr)
				wait(0.1)
				hit.Parent.HumanoidRootPart.CFrame = Door2.CFrame
				wait(1)
				debounce = false
			end
		end
	end
end)

I created a Event and the teleport works! The only issue is I need a cooldown before the event starts over again. Please help me find my error.

You didn’t reference the cooldown variable in your second script. Also, what are you firing the client for? unless it’s for something done to their client specifically, the teleport should be handled by the server else only the player will see themselves get teleported. Another thing, use

Model:SetPrimaryPartCFrame()