Is there a way to do a thread.sleep function like in java, but in lua? I am making a piston-like function based off the sliding door function where it pushes out, then waits for a set amount of time, then falls back in. I had it as time:Delay(1000) but that would pause the game and I didn't want that. Any help?