Inconsistant onTrigger AND button is pressed calls!?

What I want is a system where the player walks next to a box (both have slightly large collides so they can overlap/enter each other) they can press “e” and have it run the diging function (if you look at the code you can probably gather that). My issue is pressing “e” only sometimes works. I press it rapidly like 5 times for it to work once, but sometimes it works every time? Does anyone else have the issue/a fix? Thanks!

i guess you code is not so complicated or difficult to solve problem what you really need to do is Debug try and put Debug Everywhere in every function and check what is happening i guess code is not getting some values in if statement.some time it get value sometime it doesnt get value so its happening nothing else try and debug also wanted to tell you that do not simply past big code unnecessarily.