Script Rate - What does it mean?

I thought it was the amount of copies of a script that was running.
But I have a gamecore Script that runs a while loop and it can still turn into 2/s or 4/s in script rate.

What does that mean?

How many times per second code from that script is being executed.

Could you give an example?
How many functions are called or how many lines of assembly that’s used?

I mean, my script has only 1 while true do loop with a wait(1) inside it.
It shouldnt be able to exceede 1/s right?

I’ve always suspected that the value isn’t in seconds, but however long it takes for the display to update. If the display updates about four times per second, then scripts that run about four times per second are reported as running at 1/s.

-- Reports as 1/s.
while true do wait(0.25) for i=1,1000000 do end print("hi") end

-- Reports as 2/s.
while true do wait(0.125) for i=1,1000000 do end print("hi") end

-- Reports as 1/s half the time.
while true do wait(0.5) for i=1,1000000 do end print("hi") end

Then again, it appears to have more to do with the amount of activity.

1 Like