Hi. I want to destroy something while Changed event is triggered, by this code:
Instance.Changed:Connect(function()
if Instance.Property ~= nil then
script.ObjectToClone:Clone().Parent = plr.PlayerGui --does not matter where you wanna clone
print("yes!")
else
script.ObjectToClone:Clone():Destroy()
print("no!")
end
end)
But the cloned object is not destroyed while the property of object is changed to nil. I know that the solution is adding the variables, but how to fix this without any variable?