local target = game.Workspace.SaveObject.Value local id = game.Workspace.ack.Value while wait() do if workspace:FindFirstChild("ttest") then print("Destroying object...") if game.Workspace:FindFirstChild(game.workspace.ack.Value).Name == game.workspace.ack.Value then game.Workspace.ack.Value.Parent:Destroy() end end end
ack is a objectvalue and script deleets when ttest exists
local target = game.Workspace.SaveObject.Value local id = game.Workspace.ack.Value while wait() do if workspace:FindFirstChild("ttest") then print("Destroying object...") if id then id.Parent:Destroy() end end end
(Not tested in studio might not be 100% accurate)