Hi guys!
I know the save function works because it works like so:
while wait(5) do
for k,v in pairs(Players:GetPlayers()) do ---THIS WORKS
save(v,"PlayerData")
end
end
Any ideas why it doesn't work like this??
Players.PlayerRemoving:connect(function(plr)
save(plr,"PlayerData")
end)
game.OnClose = function()
wait(5)
end
--To make sure it has enough time to save! It can't be that!
With prints, it gets halfway through the saving data and then just seems to... stop. I cannot understand why!!
Any ideas would be greatly appreciated! Thanks!

1 comment
ROBLOX Studio is a bit bleh when it comes to data saving. Try playing the game from the website, might work.