Making frame destroyed while other frame at same parent is still not destroyed

I have a frame that is cloning itself to PlayerGui and i want that so when the other frame got cloned inside PlayerGui(frame with same name) then it :Destroy() the first frame and let other frame be there

The problem is i don’t know how to do that.

clone the frame delete the frame and then parent the cloned frame to the first frame directory