Jump to content

[Solved] FindItem in equipment (Im just stupid)


Recommended Posts

Hello all, I was wondering if anyone knew how to test for an item in your equipment slots.

I've been using this to look in the inventory but it seems that it doesn't look for items that you have equip,

if inst.components.inventory:FindItem(function(item) return item.prefab=="itemprefab" end) then

And I've tried doing something like this, but when it receives a nil value the game crashes,

local hand = inst.replica.inventory:GetEquippedItem(EQUIPSLOTS.HANDS)
if hand.prefab == "itemprefap" then

Can anyone help, please?

EDIT: DONT WORRY, I WORKED IT OUT, IM JUST A STOOP xD

:wilson_love:

Edited by Sir_Kasalott
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...