You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
Make it so the script functions properly
What is the issue? Include screenshots / videos if possible!
Line that keeps giving the error:
Information = HttpService:JSONDecode(Information.Data)
The DatastoreUpdate Function:
function _G:DatastoreUpdate(FuncInformation,Update)
local Player = FuncInformation.Player
local Key = Player.UserId
local Information = ArrestDatastore:GetAsync(Key)
local Sentence = 0
local Threshold = 15
if Information == nil then
Information = {
Sentence = 0
}
ArrestDatastore:SetAsync(Key,HttpService:JSONEncode(Information))
end
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Uhhh, I added in Information.Data so it gets rid of the String error that kept giving me an error.
Since JSONDecode will provide an empty table with a nil request, and will error when the input is not a valid JSON object, that must mean Information.Data isn’t a valid JSON object. Make sure that Information.Data is actually what you seem to want it to be.
If I lowercase to data, it still gives me the same outcome of Argument 1 missing or nil.
Also this is line 95:
game.Players.PlayerAdded:Connect(function(Player)
local PushTable = {
Player = Player
}
_G:DatastoreUpdate(PushTable) -- line 95
end)
require(script.Parent):FlushWebhooks()
@roblox_user_54556995 It does error when you provide it with nil, not return an empty table. It gives you an empty table… if you give it an empty table.