I have this but it does not seem to store any data.
local DataStore = game:GetService("DataStoreService")
local ds = DataStore:GetDataStore("AbilitySaveSystem")
print(ds)
game.Players.PlayerAdded:Connect(function(player)
print(player.userId)
local Power = Instance.new("StringValue",player)
Power.Name = "Power"
print(ds:GetAsync(player.userId))
if ds:GetAsync(player.userId) ~= "None" then
Power.Value = ds:GetAsync(player.userId)
print("He had an ability")
else
Power.Value = "None"
print("He had no ability")
end
ds:SetAsync(player.userId, Power.Value)
Power.Changed:Connect(function()
ds:SetAsync(player.userId, Power.Value)
print("Updated Ability: ".. ds:GetAsync(player.userId))
end)
end)
game.Players.PlayerRemoving:Connect(function(player)
print("Bye")
ds:SetAsync(player.userId, player.Power.Value)
print("Successfuly saved "..player.userID..": "..ds:GetAsync(player.userID))
end)

2 comments
Why are you calling GetAsync like 10 times in the PlayerAdded
I called it in the prints for me to check if it would print out in the console and I don't really know how to type it better. But it always defaults to the else as it finds the ability to always be None