Can someone please explain to me how " task.wait " and " os.time " work?

I’m just wondering what " task.wait " and os.time " do … Can someone tell me?

task.wait is the new Wait() and should be used instead of Wait(). Wait is deprecated. Learn about Task.wait here .

Huh? Idk about that one. Doesn’t exist on the roblox docs page. You mean like os.Time ?

Oh yes correct . os.time

[30letters]

os.Time is different then task.wait for sure.
I haven’t used it much, but you can read the roblox docs on it. It appears that you input a date, and it converts it into a number, so you can use it on os.date Seen in the code they provided:

print(os.time())  --> 1586982482 (ran at approx. April 15th, 2020 at 1:28 PM PST)
print(os.time{
    year=2020, month=4, day=15,  -- Date components
    hour=16, min=28, sec=0  -- Time components
})  --> 1586968080
1 Like

Alright thank you:))
[30letters]

2 Likes

task wait(): This halts the current thread the script is using for your specified time. Doing task.wait(1) will wait for 1 second.

os.time(): This will return the local time of the machine or convert input data.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.