Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

DataStore doesn't GetAsync()?

Asked by 9 years ago

No errors, nothing in input... not getting a sync :(

ClanStore = game:GetService("DataStoreService"):GetDataStore("ClanData")
player = script.Parent.Parent.Parent.Parent.Parent.Parent
repeat wait() until player.Character    
async = ClanStore:GetAsync("Points_"..player.Name)
if async ~= nil then
script.Parent.Clan.Value = async
print("Clan Loaded")
else
script.Parent.ClanScript.Disabled = false
end



script.Parent.Clan.Changed:connect(function(Val)
ClanStore:SetAsync("Points ", Val)
print("Value Changed!")
end)

--If you're wondering what ClanScript is, well it's just a script that is activated if the datastore doesn't get a sync, it randomizes your Clan Value found in the parent of this script, nothing you really need to worry about.
0
Try script.Parent.Clan.Value = tonumber(async). bobafett3544 198 — 9y

Answer this question