Help fix a stopwatch

I’m working on a timer right here, it display minutes, seconds, and then milliseconds. But, I can’t seem it get it working. I made it using if statements and “while true do” but that tends to freeze and gives you strange times. I heard that you can make timers using “tick()” but I have no clue how. I tried using one but the milliseconds displayed as “4579745459432947.4857847”. Does anybody know how to make a good stopwatch?

Provide your script please, else I could provide a good script, also are you trying to stop it with a part or gui?

When you start the stopwatch, get the os.time. Every frame, subtract the os.time of the current frame from the os.time at the start to get the number of seconds since the start of the stopwatch.