Workspace.Workspace:6: attempt to index a nil value
function script.UploadScore.OnServerInvoke(player)
local inv = player:WaitForChild("leaderstats")
local score = game:GetService("DataStoreService"):GetOrderedDataStore("TopScores")
score:SetAsync(player.Name, inv:FindFirstChild("Points").Value) -- Line 6
end
This is the script. it's called Workspace for now. I don't know what part is a nil value

1 comment
Apparently it cannot find the DataStore you are referring to, therefore score will become nil, and you cannot call :SetAsync() on a nil, or empty, value.