Maybe it would be an idea to make a variable (bool) that checks if the chest is open or not.
With the key you can cast to the chest and check the...