How to make a "wait time" command?

How do I make a wait time between 2 commands.

For example:



ply:ViewPunch(Angle(5, 0, 0));
--Wait 0,5 secs here, then do--
ply:SetLocalVelocity(ply:EyeAngles():Right()*-400)


Thanks! I already tried it with “Timer.Simple” but it didnt work.

Just use the timer again and post your code.


deleted


Thats it. I put “–I need to add the timer here–” where I need the timer to be, (or at least where I think the timer needs to) IDK how to use the timer thingy.

Maybe this?



ply:ViewPunch(Angle(5, 0, 0));

timer.Simple(0.5, function()
ply:SetLocalVelocity(ply:EyeAngles():Right()*-400)
end)


[editline]2nd February 2014[/editline]

Oh wait, that won’t work. There is no wait command sorry.

:S. Well, thank you anyway.