[Help] Attempt to compare boolean with number

so i have been busy the last few days and finally got this script complete, apart from im having a problem when checking if the player hasitem.

this is the image for the error:

this is the image for the coding error on the script:

this is line 39 with the error: if not itemCount or itemCount < item.count then

i would really appreciate the help my eyes are burning :rofl: :joy:

Looking at the documentation, the HasItem function returns a boolean and not the item count.

You are probably looking to use GetItemCount instead.

1 Like