#how to make a stop watch displaying in MM:SS:MSMS?

1 messages · Page 1 of 1 (latest)

next crescent
#

how do i save this time, optimize, and make it non exploitable?

weak trout
polar siren
#

local function formatTime(time)
local minutes = math.floor(time / 60)
local seconds = math.floor(time % 60)
local milliseconds = math.floor((time % 1) * 100)
return string.format("%02d:%02d.%02d", minutes, seconds, milliseconds)
end

#

The time variable is a tick() value

#

Used it in one of my games

next crescent
next crescent
#

btw im running the timer both client and server side

#

the client side is just to display

#

and server side is so its not exploitable

#

server has final say btw

weak trout
#

seems good yea

#

you can show server side also

#

Did you get how to format?

next crescent
#

not really ngl

#

like ik what the other guy said

#

its not even about the formatting

#

its like how do i run both the client and server at the same time

weak trout
next crescent
weak trout
next crescent
#

but that would make it easy for exploiters

#

to exploit and stuff

#

and that would be super bad for my game

weak trout
next crescent
#

crono?

#

the timer starts when player clicks a button

weak trout
#

with Datetime.now()

#

and the duration of the timer you put it in the server script

next crescent
#

wait wait

#

i kinda get what ur saying but at the same i dont

weak trout
next crescent
#

this what i have rn