Hi, I’m using Google FireBase to store player data using this module. The decoding of the data using JSON decode and printing the result works fine and shows the following output.
When I’m trying to use these values to update leaderstats values intvalues I get the following output.
I’m sure that I’m doing something wrong since the data is there but I’m not exactly sure what. My code to get the values is below:
local wins = 0 local money = 0 local getData = database:GetAsync(plr.UserId) if getData == nil then print('No Data!') elseif getData ~= nil then local decode = game:GetService("HttpService"):JSONDecode(getData) print('Found Data! '..getData) print("I have " .. getData.Wins .. " wins!") end
I have tried manually editing the FireBase data to make sure both values are above zero with no success. Thank you so much for reading this topic. Any help is appreciated.