New: Nitro Boost our Discord server and receive full donation perks here on the website! Join the Scripting Helpers Discord Server to learn more! You can also Support on Patreon as always.
Still have questions? Join our Discord server and get real time help.
Log in to vote

How to fix error, "Argument 1 missing or nil", when I am making a DataStore?

Asked by 3 months ago
Edited 3 months ago

I am currently trying to make a DataStore, and error, " 19:10:00.118 - Argument 1 missing or nil", shows up. Here is the piece of code that it is showing up on,

local function InitializeSync()                                                                         

    local NewData = game:GetService("HttpService"):JSONEncode(Sync.Data);
     local OldData = game:GetService("HttpService"):JSONEncode(DataStore:GetAsync("SyncData")); -- this is the line the error shows up on

I would appreciate help, Thanks!

Probably means Sync.Data is nil deth836231 81 — 3mo

Answer this question