#💬 guilhermevoxbrʹs Feedback
1 messages · Page 1 of 1 (latest)
remember that task.wait(2) yields the thread. In this example, it'll print first test@, then test2@ & finally testingfunction@
in this other case instead, by using task.delay(time, function() end)
a new thread gets yielded and after the time elapses it runs the function
in this case
it'll print first test@, then testingfunction@ & then test2@ after 2 seconds
also :WaitForChild("") might not be necessary
what
🤔 hmmm
i dont learned task.X
i just know task.wait
@cursive summit
what means when u use @_
😭
@ = at
"test (number for recognition) @ (at)_" string ends, to continue with automatic time string I use "..time(), which returns the time in seconds since the game started
it's a string so it doesn't mean anything other than just a character
its not used in lua afaik
.. instead is to continue strings with other elements
in somecases u need to convert them like tonumber()
otherwise it'll throw an error regarding mixing strings & numbers togetheer
task.wait is practically the optimized version of wait(), and that's a good usage of it
in this script task.delay isn't needed because it's simple and u don't really need multi threading for any other action
oh okey
thenks bro !!
also there's task.spawn() end)
which spawns a new thread
so practically a new script where you can execute yielding without yielding the main script
you could also do task.spawn() task.wait(time) end) to simulate task.delay(time, function() end) but the difference would be that on task.spawn the thread would spawn right away while on task.delay the thread would spawn once the time elapses
the biggest tip I can give u
is don't go into what u want to do right away
learn from simple things first
once u feel confident enough u can try harder stuff
this is extremely good for day 2, personally I didn't try to "learn" it at first, instead I just fucked around & found out, and that's practically how I learned the basics, although, on harder stuff the documentation always comes in handy as well as the dev forum
ohhh, ok.. thanks!
i appreciate it : )