9/19/2023 0 Comments Roblox math libraryTask.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 In order to set it up, just copy this code and put in a ModuleScript. Join a vibrant community of creators today and publish your ideas to millions of people around the world. It includes delay, spawn and wait functions. Unlock your imagination with Roblox Creator Hub - the ultimate platform for building and publishing games for free. ![]() 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 |