I'm trying to make the following script auto update a datastore value. I am using multiple servers / universes that change the datastore value which is the problem, i'd need to reset my character just to see the new update.
Here is what i've tried:
while wait(3) do local ds = game:GetService("DataStoreService"):GetDataStore("InfectedPlaylistCount") ds:UpdateAsync("val", function(Value) script.Parent.Text = tostring(Value.." in playlist") end) end
I've tried making "ds" local, but no luck. The script gives me a value, but only gives me 1 value and then that's it, i'd have to reset to see an updated version.
Help would be appreciated.
Locked by evaera, chess123mate, and TheHospitalDev
This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.
Why was this question closed?