Make Player Click When Pressed a Key

Hi! so i was wondering if someone knows how to make player click when pressed a key on the keyboard. I don’t know if it’s even possible but let me know if it is beacuse i need it! Thanks!

It is not possible to do that.

oh ok. i was also wondering if i it’s possible to do a similar thing on a button that when you press a key the button gets pressed (GUI Button)

You wont be able to make the player physically click the button after the key is pressed. However, you can make it that when a key is pressed, it will do the same action as if the button was pressed.

yeah but then you would be able to press that whenever you’re not looking and from miles away. oh well thanks for informing me about that

You can just use some math to determine if they are close enough.