If this is the wrong category then tell me so i can change it
So while i was scripting i wanted my script to load stuff faster and i found
while task.wait() do
end
loop slow it only repeat 60 times a second so i thought about
local hi = 0
while true do
hi +=1
if hi >=500 then
task.wait()
hi = 0
end
end
Its faster and it waits every 500 repeats instead of every time it repeats
You can chance the 500 to something else
if you want to slow it or make it faster
Well first and foremost, you are not the first person to discover that type of loop. I personally use a method like that inside of my runservice events to do something every n amount of frames. For your situation, you could also just increase the wait time per loop and get similar results.
RenderStepped loops every frame of the client (and can not be used in the server) and so would loop as much as the frames per second of the client. If you have an fps-unlocked, say 144fps, then the loop goess 144 times per second.
So I think if you are on the client, RenderStepped is the fastest (well for the use-case).
Can someone suggest me the use case when would I need a loop this fast?