เดี๋ยวก่อนฟังก์ชัน language
function wait(seconds)
local start = os.time()
repeat until os.time() > start + seconds
end
--Exactly the same as the roblox one!
เดี๋ยวก่อนฟังก์ชันสร้างใหม่ใน language
function wait(seconds)
local start = os.time()
repeat until os.time() > start + seconds
end
-- This is the wait function (mostly known from roblox)
-- It works exactly like the roblox version
-- It's used like this: wait(how many seconds)
วิธีการออยู่ใน language
wait() --parameter is seconds
language เดี๋ยวก่อนฟังก์ชัน
local function wait(seconds)
local time = seconds or 1
local start = os.time()
repeat until os.time() == start + time
end