So I'm creating a PewDiePie vs.Cocomelon game and (since I can't use GetAsync in a LocalScript) I'm trying to pull the GetAsync from SocialBlade in a module and then go into the LocalScript and string.gmatch the GetAsync from the module and add the gmatched string into a TextLabel.
Unfortunately, it gives me an error.
10:56:05.893 - Requested module experienced an error while loading
Here's my code:
``From the module
local module = {}
module.subdata = { ["Sub Count"] = game.HttpService:GetAsync("http://socialblade.com/youtube/user/pewdiepie/realtime") }
return module``
``From the LocalScript
local data2 = game.ServerScriptService.ModuleData local data = require(data2["Sub Count"])
print("Found Async, processing")
while true do wait(2) for count in string.gmatch(data, "[%d%p]+") do print("Found Sub Count, adding text:") script.Parent.Text = count end end``
How can I go about doing this?
-2048EE

1 comment
Please use code block or we can't help you.