Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to Obtain a List from a Text Document?

Can somebody tell me how I would make a Pastebin document into a list? (The document itself is a list.)

1 comment

0

post link of it

1 answer

✓ Accepted answer

Make the document JSON formatted. Then use HttpService:GetAsync() to fetch it, and then use HttpService:JSONDecode() to turn it into a table

local url = "http://pastebin.com/raw/blablabla"

local hs = game:GetService("HttpService")
local document = hs:GetAsync(url, true)
local json = hs:JSONDecode(document)
--do stuff

This discussion is preserved as it was. New answers, comments, and votes are closed.