Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is there an efficient way to detect whether a player has pressed a key on the server?

Asked by 5 years ago

I’m making a ship where it can not only go back and fourth but up and down. I can easily detect whether a player wants to go forward or backwards as there is a vehicle seat with properties such as Throttle which I can use changed events to fire certain things and the same with steering.

The problem I have no is that I want players to be able to go up and down by pressing Q and E respectively. Of course I can just use a key down event which then fires a remote event to the server and so on, but the players can “Exhaust” the event if they spam the event many times per second, potentially breaking the game. Is there a better, robust and safer way to detect player key downs within the server?

0
The chances that a player will exhaust your event are very low - but if you're worried about it is there any reason you can't just add a cooldown? SummerEquinox 643 — 5y

Answer this question