Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

[SOLVED] Why is this DataStore code not working? It seems like the same as the video.

Asked by 2 years ago
Edited by Xapelize 2 years ago

This question has been solved by the original poster.

Leaderstats saving and loading from AlvinBlox

01game.Players.PlayerAdded:Connect(function(player)
02 
03    --leaderstats variables
04    local leaderstats = Instance.new("Folder")
05    leaderstats.Name = "leaderstats"
06    leaderstats.Parent = player
07 
08 
09    local Sips = Instance.new("IntValue")
10    Sips.Name = "Sips"
11 
12    --load function with pcall
13    local success, value = pcall(function()
14        return myData:GetAsync(player.UserId)
15    end)
View all 40 lines...
0
Are you sure API and Third-Party Services are on? T3_MasterGamer 2189 — 2y
0
The problem was that I didn't write the myData variable. Thanks itsmtninja 11 — 2y

Answer this question