I've tried getting the arguments right in the methods :GetAsync() and :SetAsync() but nothing new happens like it doesn't save. I don't know if my arguments are wrong or what, no error occurs either. Any help?
-----Saving
game.Players.PlayerRemoving:connect(function(plr)
local Data=game:GetService("DataStoreService")
local button=workspace.PartTwo:FindFirstChild("SurfaceGui").Frame:WaitForChild("Button")
-----Name
Data:GetDataStore("SaveApplication")
-----Save
while wait(3) do
Data:SetAsync("Keysave",button)
end
end)
------Loading
game.Players.PlayerAdded:connect(function(plr)
local Data=game:GetService("DataStoreService")
local button=workspace.PartTwo:FindFirstChild("SurfaceGui").Frame:WaitForChild("Button")
-----Name
Data:GetDataStore("SaveApplication")
-----Save
Data:GetAsync("Keysave",button)
end)
