Hey guys, I have problem with locked chest.
I tried to do this myself and my logic was that I will add the key as an item to the chest variables and when player will come to the chest and tries to open it will check it the player has in his inventory the same key as is added to the chest.
If player has the key in his inventory the chest would open.
Unfortunately I am getting an error and I can't figure out how to write this function correctly.
Any help would be appreciated, thanks!