#Total Playtime with Datastore?

1 messages · Page 1 of 1 (latest)

warped pond
#

Hello, I was wondering how to save the total playtime of a player on my game using the DatastoreService.
I know that is possible with something call os.time or something like that but I couldn't find more

And aditionnally, for esthetic purposes, I was wondering if it's also possible to update this data every minute (so in my statistics gui it's always updated) but for that I heard that each datastore has limitations so is this a problem if I want to update it every minute?

half herald
#

look into tick()

warped pond
half herald
#

if u store the tick when they leave and the tick when they join

#

you can subtract them from eachother to get the amount of seconds the player was in the game for

#

then you can do whatever with that

warped pond
#

but isn't it the same with dateTime?

half herald
#

no clue i always use tick when i need to though

#

its just the amount of seconds since a certain date in like 1980

warped pond
#

ok thanks

warped pond
half herald
#

I recommend not grabbing it from the datastore

#

When they join grab it from the datastore and increment onto that

#

Then when they leave save it onto their datastore

warped pond