Simulating a keypress?

Is it even possible to force the player to press a key that the game would read as if the player has pressed the key manually on his keyboard?


Doesn’t that just detect when a player presses the key?

That’s hook.Add, not hook.Call.

Alright, then thanks Wizard of Ass, tho I’ve never used it before, never seen an example either. Could you please write an example for lets say a player hitting a space key on sandbox gamemode, as an addon. On the wiki it says to add hooks before calling and is confusing as hell for people who never saw anything like this.