Local function still damaging after clone was destroyed

I’m currently making a mini horror game and I’m having issues with a local script… I’m not sure why, but even after the clone of the monster has been destroyed, the script continues to run and I still get damaged when looking away. Here is my script.

Local Script

local run = game:GetService("RunService")

local camera = workspace.CurrentCamera

local part = workspace:WaitForChild("d")

local player = game.Players.LocalPlayer.Character.Humanoid

local function onRenderedFrame()
	local position, visible = camera:WorldToScreenPoint(part.Position)
	if visible then
		print("LOOK")
		
	elseif not visible then
		print("NOT LOOK")
		player.Health -= 0.5
	end
	wait(20)
	return
end

run.RenderStepped:Connect(onRenderedFrame)

Monster Script

local trigger = game.Workspace.LOOKTrigger
local plr = game:GetService("Players")
local main = script.Parent
local clone = main:Clone()

plr.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		local humanoidrootpart = character:WaitForChild("HumanoidRootPart")
		
		
		trigger.Touched:Connect(function(hit)
			if hit.Parent:FindFirstChild("Torso") then
				trigger:Destroy()
				print("Look worked.")
				clone.Parent = game.Workspace
				clone.CFrame = humanoidrootpart.CFrame * CFrame.new(0,1,-15)
				print("Clone WOrked")
				wait(20)
				clone:Destroy()
			end
		end)	
		
	end)
end)

If you need any more information let me know. Sorry it’s kinda messy.

Technically, the reference to the old part is still there for the first time and goes unchecked forever. Make sure it is always updated to a new part and not the same old one.

How would I update the clone to always be a new one?

I’m referring to this reference. Try to actively seek out the part inside the stepping function for it, such as part = workspace:FindFirstChild("d") and followed by a guard statement to not continue if no part is detected.