Beware! When the wait command is active your current action will remain used. So if you are pressing R to reload while the wait command gets triggered, it will keep wanting to reload until all wait commands are done.
This means the wait command isn’t a good method or fix for a delay in scripts. Unfortunately actually, it would be very useful if there was an alternative that didn’t keep the commands running.
It is still a good thing though, for example when you want to create a script that makes you run for several seconds, you can use this wait command.
Also notice the duration of wait can be different depending on how many frames per second you have. So better make sure your fps is either stable or you put a cap on it while running a script with wait. (just add a com_maxfps 43 for example in the scriptline)
What is the Wait Command for?,