RunLater
We’ll explore the usage and important considerations for the frequently used RunLater method in Funkland.
Use RunLater
-- Print "Hello, World" after 2 seconds
Client.RunLater(function()
print("Hello, World")
end, 2)Time Interval Guarantee Issue
-- 1초마다 메시지 출력
local startTime = os.time()
local function printMessage()
local currentTime = os.time()
local elapsedTime = currentTime - startTime
print("Elapsed time: " .. elapsedTime .. "second")
end
local function runLaterExample()
Client.RunLater(function()
printMessage()
runLaterExample()
end, 1)
end
runLaterExample()Performance Issues
Validity Guarantee Issue
Last updated