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

Deleting data persistance?

Asked by 10 years ago
game.Players.PlayerAdded:connect(function(p)
    p:WaitForDataReady()
    local SV = Instance.new("StringValue", p)
    SV.Name = "Chats"
    C = p:LoadString("Chats")
    SV.Value = C
    p.Chatted:connect(function(msg)
if msg == "Delete" then
       WaitForDataReady:ClearAllChildren()
 end   end)
end)

is not deleting the stuff i have in the data persistence stuff. Or can you not clear data persistence? I wanted it to delete anything that was ever saved with data persistence to be "forgotten"

1 answer

Log in to vote
-1
Answered by
wrenzh 65
10 years ago

There is no method to "delete" anything saved in data persistence.

However, you can overwrite it.

For example, if it was a String, you could use player:SaveString(key, "")

Ad

Answer this question