How to properly use table.find()

So basically, I’m trying to see if a player has a certain item. The player’s inventory items are stored in a table. If the player has the vip gamepass, then they get that certain item, but I don’t want it to duplicate.

if MarketplaceSerice:UserOwnsGamePassAsync(player.UserId, 57645315) then
		if not table.find(itemHolder.OwnedSkin, "Glow Gold") then
			table.insert(itemHolder.OwnedSkin, "Glow Gold")
		end
	end

Yeah, that should work just fine. You can test it out in studio if you want to, all for free.

1 Like

I changed up some things, and now it works. Thank you very much.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.