local DataStore = game:GetService("DataStoreService")
local PointsData = DataStore:GetDataStore("PointsData")
game.Players.PlayerAdded:Connect(function(plr)
local Points = Instance.new("NumberValue",plr)
Points.Name = "Points"
local Data
local success, message = pcall(function()
Data = PointsData:GcetAsync(plr.UserId.."-Points")
plr.Points.Value = Data
end)
if success then
print("Success")
else
warn("Error Whilst loading. Error message: "..message)
end
end)
game.Players.PlayerRemoving:Connect(function(plr)
local success, message = pcall(function()
PointsData:SetAsync(plr.UserId.."-Points", plr.Points.Value)
end)
if success then
print("Success")
else
warn("Error Whilst saving. Error message: "..message)
end
end)
COMMUNITY QUESTION
I am trying to make a point system but it wont load the amount. Did I do anything wrong?
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Yes, you put gcetAsync instead of getasync.
10th line. you've been put GcetAsync instead GetAsync.