Hello!
While developping my game I decided to see how long did the game last.
Basically, in my game, I have a start up screen, the game starts and the end the player might die or survive.
And when the player wins or die I want to see how long he lasted.
But I thought I could just do this:
StartUp script
Script info:
Type:Normal
--Script does its usual functions
--So basically this is at the end, when all the "StartUp" functions are done and the game has begun.
local Module = require(Module) --Here we just locate the ModuleScript
while true do
Module.TotalTime += 1
wait(1)
end
…but this could make the game a bit laggier and waste memory. And I am pretty sure there’s another way to do this that doesn’t require much memory.
So TL;DR: I want to see how long (in seconds) since a function has been done without using memory wasting loops.
Thanks for reading!