Problem with Changed Function

This is the only script I know that does anything with the time value, would this break anything?

game.Players.PlayerRemoving:Connect(function(Player)
     local leaderstats = Player.leaderstats
     local timevalue = leaderstats.Time.Value
     local datastore = game:GetService("DataStoreService")
     local ds1 = datastore:GetDataStore("TimeSave")

     local success, err = pcall(function()
        ds1:SetAsync(Player.UserId, timevalue)
    end)   

end)

I don’t see here anything that changes the value, I don’t think it’ll break it.
It just saves the value. And even if you do change the value. It’ll increase by 1 every second anyways until the player leaves.

There was a stupid mistake on my side, there was a duplicate script that added to the value. Sorry about that.

1 Like