Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to yield across metamethod?

Asked by 5 years ago
local Http = game:GetService("HttpService")
local Data = setmetatable({},{
__index=function(t,k)
if k == "ActualApi" then
return Http:GetAsync("https://anaminus.github.io/rbx/json/api/latest.json",true)else
return rawget(t,k)
end
end})

print(#Data.ActualApi)
--This error "attempt to yield across metamethod/C-call"
--And "cannot resume non-suspended coroutine"

Answer this question