local DataStore = game:GetService("DataStoreService") local ds1 = DataStore:GetDataStore("Point") game.Players.PlayerAdded:connect(function(player) local PointMaster = Instance.new("Folder",player) PointMaster.Name = "Points" local Points = Instance.new('IntValue',PointMaster) Points.Name = "Valu" Points.Value = ds1:GetAsync(player.UserId) or 0 ds1:SetAsync(player.UserId,Points.Value) local Points = Instance.new('IntValue',PointMaster) Points.Name = "EXP" Points.Value = ds1:GetAsync(player.UserId) or 0 ds1:setAsync(player.UserId,Points.Value) Points.Changed:connect(function() ds1:SetAsync(player.UserId,Points.Value) print("Points Saved!") exp.Changed:connect(function() ds1:setAsync(player.UserId,exp.Value) print("EXP Saved!") end) end) end) game.Players.PlayerRemoving:connect(function(player) ds1:SetAsync(player.UserId, player.Points.Points.Value) print("Data Saved") end)
This is what I've tried.
Can someone help or correct this?
That should work... Unless you want them to be 2 different data stores. This one data store with 2 variables, which would work also.