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

JSon not exactly working? More clarification? maybe?

Hey guys, I just wanted to test this JSonEncode / Decode thing and apparently I am really confused

local HttpService = game:GetService("HttpService")
 local numb = 1
local characterStats = {}
local json = HttpService:JSONDecode(characterStats)
print(json)
print("Works")
table.insert(characterStats, "hello"..numb)
numb = numb + 1
json = HttpService:JSONEncode(characterStats)
print(json)
print("(2) works")

I did that ^ hoping that "numb" the variable would add + 1 and it would save but I am very confused with this and that is why I came here.. To get clarification on JSon, Can someone help me figure out how to use JSon?

1 answer

You set the characterStats immediately before decoding it. You need to use the saved value or whatever you used, and it needs to be a string. Other than that, it should be fine.

Hope this helps!

2 comments

0

thx

0

I will check it later man

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