Reset Datastore between 2 Places

im making a new game option on the menu game, which should reset the datastore in the main game.

how could i do this

Datastore between places in the same Experience are the same, so you could just use a server script to reset a player’s data by using the same datastore and player id.

Adding on to whar @Qariter said, you can use GlobalDataStore:RemoveAsync() to do this. You could use a RemoteEvent to call it.

local function clearStore(player:Player)
    local success, result
    local attempt = 0

    repeat
        success, result = pcall(DataStore.RemoveAsync, DataStore, player.UserId --[[replace with save key]])
        attempt += 1
    until
        success or attempt == 3

    if not success then
        warn(result)
    end
end

RemoteEvent.OnServerEvent:Connect(clearStore)
1 Like

Is it possible to fire events through placee?

No, but like Qariter said, if the places exist under the same universe then they all use the same data stores. Clear it in one place, and it will replicate to the others.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.