Im running Inventory:GetChildren() and printing v.
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?
No, there are currently no errors. Everything prints out.
I just re-printed again,
Then what is the problem? Please develop your problem more on your most
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.
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.
Also please try to combine thoughts into post. Making multiple post with little text clutters the topic
Could I take a look at your explorer?
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.
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.