Hello,
I got some data store scripts here that arent saving and im not sure why and there was also no errors
Script One:
local datastore = game:GetService(“DataStoreService”)
local ValueStore = datastore:GetDataStore("TTB")
local value = game.ReplicatedStorage.TTB
game:BindToClose(function()
ValueStore:SetAsync(game.ReplicatedStorage, value.Value)
end)
Script Two:
local datastore = game:GetService(“DataStoreService”)
local ValueStore = datastore:GetDataStore("TTB")
local value = game.ReplicatedStorage:WaitForChild("TTB")
local THEVALUE = ValueStore:GetAsync(game.ReplicatedStorage)
value.Value = THEVALUE
I am not referring to the StringValue, you’re giving the first argument of SetAsync and GetAsync game.ReplicatedStorage, ReplicatedStorage is an instance, it expects a string to be given to be the key
That sounds like you’re changing it from the client then, go to the test category on the top of your screen and click on Current: Client to change to the server’s perspective, then change the value.
It worked!, Thank you so much!!, also just 1 more thing you could help me with, how will make a value in the player that saves but doesnt show on the leaderboard
Just parent the value somewhere else outside of the leaderstats instance, the value only shows up on the leaderboard if it’s in an instance in the player called leaderstats