How do i turn this string value into a table, it doesnt work for me :( it basically returns a table in string format and i tred using JSONEncode to make it into code? idk help me please!
local Message = game:GetService("HttpService"):GetAsync("http://pastebin.com/raw/R6wy0FNx", true) while wait(1) do Message = game:GetService("HttpService"):GetAsync("http://pastebin.com/raw/R6wy0FNx", true) print(game.HttpService:JSONEncode(Message[1])) end
Your message returns a full string that needs to be parsed, not a JSON table. Each string of numbers needs to be separated and inserted into a table that you can then access.
local http_service = game:GetService("HttpService") local Message = http_service:GetAsync("http://pastebin.com/raw/R6wy0FNx", true) local ids = {} -- Matches each string of numbers and inserts them into a table for i in string.gmatch(Message, "%d+") do table.insert(ids, i) end print(ids[1])