Task.wait(n - os.clock() + time_) - Waits n seconds. If os.clock() - time_ < n then - If n has passed, then it doesn't yield. " value")Įvent.Event:Connect(function() - Connects the function with the BindableEvent Local param = - Puts the parameters in a tableĮrror("attempt to call a ". Local event = Instance.new("BindableEvent") - Creates a BindableEvent Return os.clock() - time_ - Returns the time that has actually elapsed. If false then end - Repeats this function that doesn't "yield" until n has passed. If os.clock() - time_ frame then - Verifies if n is more than the last frame delay.įrame = task.wait() - Waits for the next frame until the time passed is close to n N = tonumber(n) or 0 - If it's not a number, it will count it as a zero (not recommended, less performance) Local time_ = os.clock() - Records the time when the function was called local frame = task.wait() - Counts the last frame delay Terms in this set (32) math.abs(number x) Returns the absolute value of x. math.abs(number x) Click the card to flip. In order to set it up, just copy this code and put in a ModuleScript. Math Library (ROBLOX Lua) 5.0 (1 review) Flashcards. It includes delay, spawn and wait functions. These functions are for people who are looking for a more accurate task library.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |