local zauna = game:GetService("DataStoreService"):GetDataStore("Zauna")
script.Parent.MouseButton1Click:connect(function(player)
local leaderstats = player.leaderstats
local zaunapoints = player.leaderstats.Zauna
local key = "user_" .. player.userId
wait(0.1)
zauna:UpdateAsync(key, zaunapoints.Value)
end)
I'm really new to Datastores, and I'm really confused with them. I can't really see what I'm doing wrong. I don't know, but maybe the "player" variable doesn't really access the player? Or maybe a capitalization error? I can't really find anything. I really don't know much about datastores. I'm just experimenting because I'm trying to get a working saving script in my game.

4 comments
What are you trying to do here?
nevermind, i got it working. it was probably glitched or something.
Also, I was trying to make a save button.
Oh, ok then.