I just saw a very similar post a few minutes ago.
Please refer to this page for how to post code properly on the forums: Using code tags properly
The problem with your code is that you are attempting to get input on the same frame as when the trigger occurs. - Just 1 frame of opportunity*
Try to re-work your script/logic so that you can determine when inside the trigger is valid, and check for the input in your Update() loop when that’s true. See how that goes