local Frame = script.Parent.Frame
local List = Frame.List
All frames in the List shall be affected by this. Note that this is the function:
-- Event Listener for opening a crate
ReplicatedStorage.Remotes.OpenCrate.OnClientEvent:Connect(function(itemTable: table, category: string)
if not itemTable or not category then
warn("Missing or nil argument")
return
end
local categoryCrates = Crates.Crates[category]
if categoryCrates then
for _, crate in ipairs(categoryCrates) do
addItemToList(crate)
end
startScrollingAnimation(itemTable.Element)
else
warn("Category not found in Crates")
end
end)
itemTable.Element is the name of the item name in list it will stop at. Items are generated once in game.
You probably understand how this system will work.
Any help will be appreciated.