local datastore = game:GetService("DataStoreService")
game.Players.PlayerRemoving:Connect(function(player)
local datastore2 = datastore:GetDataStore(player.UserId .. "Dialog2")
local Dialog = workspace.Dialog
datastore2:SetAsync("Dialog2", Dialog.Value)
end)
game.Players.PlayerAdded:Connect(function(player)
local datastore2 = datastore:GetDataStore(player.UserId .. "Dialog2")
print(datastore2:GetAsync("Dialog2"))
end)
COMMUNITY QUESTION
DataStore script printing data is nil, why?
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.
