Jump to content

How to check item in inventory on client side?


Recommended Posts

@Maris, I gave two options, if you choose to ignore the first option the only way to do it is to request the information from the server and bounce it back to the client. The reason I gave both options is because sometimes not all the information is sent to the client even those it's "displaying" the item.

Link to comment
Share on other sites

if inst.replica.inventory then	local has, number = inst.replica.inventory:Has("prefab", "amount")	if has then		print("There are "..number.." of prefabs")	endend

You can also get the itemslots table with GetItems(),

an item from a slot with GetItemInSlot(slot),

and check for tags in equipment with EquipHasTag(tag).

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...