My idea was to have a persistent variable to hold the lastFired time object and then the script can compare now() with that time. (If there's a better weay, let me know)
Unfortunately, I can't see how to initialise the persistent variable to be a Time object. I tried
Code: Select all
data = {
TimePIRLastFired = {initial = Time()}
}
Code: Select all
local Time = require('Time')