#What is the difference between random and math.random. and the difference between task.wait and dela
1 messages · Page 1 of 1 (latest)
the difference between task.wait() and delay is you can run other code while using task.delay()
** You are now Level 4! **
I think
yeah it's that
example: task.delay(1, function()
print("hi")
end)
print("hi")
it will first print the "hi" after the task.delay()
for example
you have a function
and you need to wait a bit for another function to run
but you want to run another function while waiting
so you will do:
function RunFunctions()
task.delay(1, function()
YourFunction()
end)
YourOtherFunction()
end
the function called "YourOtherFunction()" Will run and while it's running it will wait 1 second to run the function called "YourFunction()"
if you use task.wait(1), then the function called "YourFunction()" will run first
OHh