There is no error.
01 | local DSService = game:GetService( 'DataStoreService' ):GetDataStore( 'Hamburger223232' ) |
02 | game.Players.PlayerAdded:connect( function (plr) |
03 | -- Define variables |
04 | local uniquekey = 'id-' ..plr.userId |
05 | local leaderstats = Instance.new( 'IntValue' , plr) |
06 | local savevalue = Instance.new( 'IntValue' ) |
07 | leaderstats.Name = 'leaderstats' |
08 | savevalue.Parent = leaderstats |
09 | savevalue.Name = 'Tokens' |
10 |
11 | -- GetAsync |
12 | local GetSaved = DSService:GetAsync(uniquekey) |
13 | if GetSaved then |
14 | savevalue.Value = GetSaved [ 1 ] |
15 | else |