before I start showing this note that I know there are many options for waiting, I just want to know if this works well at all as I’ve never tried it.
function Sleep(Count)
if Count == nil then
Count = 0
elseif type(Count) ~= “number” then
return warn(“this would be a warn message”)
end
local OSTime = os.time()
while true do
if os.time() - OSTime >= Count then
break
end
end
end
while true do Sleep()
print(“at school on my phone rn, extremely bored”)
end
any thoughts on this?
how well would this work and can it be improved?
You’ve asked for feedback I gave you the feedback - avoid using unnecessary while true loops and as somebody said it will crash your game because there isn’t wait() anyways.