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

Why does'nt this save player data?

Asked by
thortol 22
8 years ago

game.Players.PlayerAdded:connect(function(Player)

Player:WaitForDataReady()

local StarterPack = Player:LoadInstance("Dirt") 

Player:SaveInstance("Dirt", game.StarterPack)

Player:SaveInstance("Rock", game.StarterPack)

wait (30)

end)

I'm trying to save the tool called dirt and rock so that when the player picks it up it remains with them when they log in again.

0
Are there any errors? darkelementallord 686 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

Regardless of how the script works, I think you should probably be using data stores instead of persistence. Check this wiki article to see how data stores work.

0
DataStores cannot save instances. So, if an instance was absolutely needed to be saved, then DataStores would not work. However, I do agree that DataStores should be used instead wherever possible. iconmaster 301 — 8y
Ad

Answer this question