i dont have a clue what is wrong here at all!!!
ive been trying for ages ;(
data = game:GetService("DataStoreService") save = data:GetDataStore("Tools") game.Players.PlayerAdded:connect(function(player) k = player.Backpack:WaitForChild("BDtest") k.Value = save:GetAsync(player.UserId) or 0 save:SetAsync(player.UserId, k.Value) game.Players:WaitForChild(player) k.Changed:connect(function() save:SetAsync(player.UserId, k.Value) end) if k.Value == 1 then game.ReplicatedStorage.vamp["Blood Drain"]:Clone().Parent = player:WaitForChild("Backpack") player.Backpack["Stone Mask"]:Destroy() save:SetAsync(player.UserId, k.Value) end end) game.Players.PlayerRemoving:connect(function(player) local k = player.Backpack:WaitForChild("BDtest") save:SetAsync(player.UserId, k.Value) if k.Value == 1 then save:SetAsync(player.UserId, k.Value) end end)
Hey,
Not an idea whether this will work or not but I mean, I can try to help.
Have you tried for example on line 7:
k.Value = save:GetAsync(tostring(player.UserId)) or 0
Probably won't work but I mean, give it a shot if you want.
Sam