Hi, I have a simple scripting problem. You don't need any prior knowledge about UNITY.
So when the player gets close enough to an object he can press 'E' to open a menu. Doing all this is fine, but I can't figure out how to close it again. I have tried a lot of different ways to get it working. I want to make "EKeyPressedTwice" false to deactivate the menu. So when the player opens the menu he can press E again to make the menu close. The process happens to fast and Boolean EKeyPressedTwice switches between true and false to quickly to display the menu for the first time.
I found a solution if any one is interested. I implemented a timer so if you press E the menu opens and if you hold E in for longer than I second the menu closes. A much better solution and engages the user more.