I am cloning this Folder full of TextLabels into a SurfaceGui. I have a button in the SurfaceGui to remove the Folder with "Destroy()". The Folder never removes when I click the button. (The game is FE)
Cloning Script: --This is a LocalScript
script.Parent.MouseButton1Click:Connect(function() script.Parent.Parent.Parent.Parent.ScreenGui.Frame.Visible = true wait(0.1) local order = game.Players.LocalPlayer.Backpack.Order:Clone() order.Parent = game.Workspace.OrderMachine.Order.SurfaceGui.Frame end)
Destroy Script: --This is a Script
script.Parent.MouseButton1Click:Connect(function() script.Parent.Parent.Order:Destroy() end)
I think I know what it is. See, when you clone the folder with the localscript, only the client sees the folder, not the server. Therefore, when the server tries to destroy it, it can't even find it, so an error pops up. I think this is what you are doing wrong. And considering the game is FE, you have got a BIG problem. So I think you need to use a server script to clone it. I know this might seem hard to do, but you can use RemoteFunctions and RemoteEvents to make the server and client communicate. I bet you will find a way. If this isn't your problem and the server sees it, I don't know what to tell you.