Here is the script for creating the datastore value:
game.Players.PlayerAdded:connect(function(player)
local BV = Instance.new("BoolValue",player)
BV.Value = false
BV.Name = "Code1Redeemed"
local ds = game:GetService("DataStoreService"):GetDataStore("user"..player.userId)
ds:SetAsync("Code1", BV.Value)
end)
Now, I'm trying to update the value when a player clicks a button:
script.Parent.MouseButton1Down:connect(function()
local ds = game:GetService("DataStoreService"):GetDataStore("user"..player.userId)
local DataLoaded = ds:GetAsync("Code1")
ds:IncrementAsync("Code1", true)
print("Code1 sent to true")
end)
Unfortunately, It isn't working. I'm pretty sure I did it right, but I'm not sure. Any help appreciated.

2 comments
Thank you!
No problem.