GetAysnc is not a valid member of GlobalDataStore

I want this data store to save your data(like all datastores do), but i get the error “GetAysnc is not a valid member of GlobalDataStore”

Full Error -

01:43:22.735 GetAysnc is not a valid member of GlobalDataStore
DataStoreService.EXPSaveSystem" - Server - Script:21
01:43:22.736 Stack Begin - Studio
01:43:22.736 Script ‘ServerScriptService.Script’, Line 21 - Studio - Script:21
01:43:22.736 Stack End - Studio

Code -


local DataStoreService = game:GetService("DataStoreService")
local experienceStore = DataStoreService:GetDataStore("EXPSaveSystem")

game.Players.PlayerAdded:Connect(function(plr)
	local battle = Instance.new("BoolValue",plr)
	battle.Name = "_battle"
	battle.Value = false
	
	local battle = Instance.new("BoolValue",plr)
	battle.Name = "_pvp"
	battle.Value = true
	
	local folder 	= Instance.new('Folder',plr)
	folder.Name = "leaderstats"
	
	
	local exp = Instance.new("IntValue",folder)
	exp.Name = "EXP"
	
	experienceStore:GetAysnc(plr.UserId, exp.Value)
	
	exp:GetPropertyChangedSignal('Value'):Connect(function()
				experienceStore:SetAysnc(plr.UserId, exp.Value)
	end)
	
	game.Players.PlayerRemoving:Connect(function(p)
		experienceStore:SetAysnc(p.UserId, exp.Value)

	end)
	
end)


	


Note - Dont mind about the pvp and battle stuff.

you spelled it wrong lol. its :GetAsync()

3 Likes

Am i really that dumb? Thanks lol.

1 Like