Frames not destroying

image
image

Im running Inventory:GetChildren() and printing v.

Can we see your actual script?

local ReplicatedStorage = game:GetService("ReplicatedStorage")

local Player = Players.LocalPlayer
local PlayerGui = Player.PlayerGui
local MainGui = PlayerGui:WaitForChild("Main")
local PetsGui = MainGui:WaitForChild("PetsGUI")
local Info = PetsGui:WaitForChild("Info")
local Inventory = PetsGui:WaitForChild("Inventory")
local Template = script:WaitForChild("PetTemplate")

local function setInventory(action, data)
	if action == "Multiple" then
		for _,v in pairs(Inventory:GetChildren()) do
			print(v)
		end
    end
end

ReplicatedStorage.Event.OnClientEvent:Connect(setInventory)

Are there any errors in the output?

1 Like

No, there are currently no errors. Everything prints out.

I just re-printed again, image

Then what is the problem? Please develop your problem more on your most

1 Like

Hmm, I’m destroying those frames but when opening the GUI, the items are still here.

I don’t see any :Destroy() in your script to destroy the frames.

1 Like

image
image
Hmmmm these wont destroy.

If you didn’t put :Destroy() to destroy the frames, please do so now as @BawTheSeal stated.


You might have ResetOnSpawn enabled. Disable it by going inside the properties of the GUI and un-checking it.
image

image

To

image

Also please try to combine thoughts into post. Making multiple post with little text clutters the topic :slight_smile:

1 Like

Could I take a look at your explorer?

image
Yea sure

The script seems fine to me though I might have overlooked something, what are your passing arguments from the Remote Event? Does removing the line:

if action == "Multiple" then

Make any difference? Take a look at what @/TenOunce said maybe that’s the problem.

I mean, its printing and it passed this argument, so the problem aint here.

Did you try my suggestion? If not, try that.

Also if you could adjust your title and information. It is a bit misleading to your situation and disables certain types of people that may be able to help from helping.

EDIT: The issue may be when you create the frame, can we have a look at that?

Oh, fixed the problem! It was something from another script. Sorry!

EDIT : Still don’t know how I did… but its way too complicated to describe.

1 Like

Great to hear you solved the problem. Please create a solution post or mark a post as a solution so no one else will disturb this topic.