And, you might want to increment/decrement with "time_step / 16", and wait(1) (1 frame). Otherwise, your function stops for 1 second (wait(-1)) and runs again... With time_step / 16 your function runs with the frames per second speed. laugh

Not that its vital for a flashlight, but sometimes you might want to do other stuff around that if statement, that has to run more times per second...so use wait(-1) only when its trivial.

Last edited by EpsiloN; 04/04/15 19:02.

Extensive Multiplayer tutorial:
http://mesetts.com/index.php?page=201