local max = math.max(1,2,3,4,5,6,7,8,9,10,11)
local plr = game.Players.LocalPlayer
local pack = plr.Backpack:GetChildren()
local replicatedstorage = game:GetServer("ReplicatedStorage")
if pack.max then
print("This player has to many items")
pack:Destroy()
replicatedstorage.RedFoil:Clone()
else
print ("This player is under the limit")
end
I want the player to only have one item, and to destroy all but one of the swords in the inventory, which will clone again. I have a shop with multiple swords and I want to delete all other swords so the player only have the one they chose.
I dont get any errors but it doesnt print.
