Your delay is a hexidecimal value, consider changing that
uh it was a mistake when taking screenshot, it wasn’t like that
Well just change the waits down below to your specific wait time
I will have to try it myself when I wake up
okay thanks
300characterslolhi
wait(0.001) isn’t going to wait 1ms. As has already been pointed out above, the minimum wait time for basic wait() is around 30ms (2 frames). Using RunService.RenderStepped:Wait() should be about twice as fast (60 chars per second). The only way to have it display faster than 60 cps is to add multiple characters per frame.
local RunService = game:GetService("RunService")
...
RunService.RenderStepped:Wait()
I am using LocalScript for the GUI’s typewriter, i used the MoudleScript for the moudle itself
i tried to use RunService.RenderedStepped:Wait()
like this
but it have a error like this:
i also tried to definite the “RunService” in the script
What did you define RunService as?
the same as the MoudleScript, local RunService=game:GetService("RunService")
Also it isn’t RenderedStepped, it’s RenderStepped
ok, i will try it out one hour later cuz i have to go outside now
It’s RenderStepped, not RenderedStepped.
You have a typo.
Also, I’m not sure RenderStepped has a Wait method like that. Might be wrong, but I’ve always used it by binding functions to RenderStepped (See the documentation).
okay i will try it out later i need to go outside
It does have a Wait() method. It says it on the API
Really? Where?
I tried to look for it in RunService and in RunService.RenderStepped and couldn’t find it. I’ve even searched explicitly for it and found nothing.
Seems like bad documentation…
Also, this seems like a bad time to use RenderStepped. I would use Heartbeat or Stepped. This does not need to be happening before frame rendering… unless i guess you want a literal 1 frame delay?
EDIT: Googling it, I found this.
This confirms my suspicion that binding wait (which has a 30 FPS cap) to RenderStepped would be a bad idea (since now your game waits 1/30th of a second before rendering the frame… 30 FPS frame cap!)
EDIT 2: Apparently, that’s not how :wait works when it’s bound to events.
Apparently :wait() - as opposed to wait() - simply yields the thread until the function it’s bound to (in this case render stepped) finishes/returns, so in this case, it would actually be pretty useful.
Nifty! TIL
It is not bad documentation, you aren’t looking in the correct place. :Wait
is a method of RBXScriptSignal, not RenderStepped
specifically.
https://developer.roblox.com/en-us/api-reference/datatype/RBXScriptSignal
That makes sense, but how was I supposed to figure this out?
Seems like wizardry to know that “Event” is a nickname for RBXScriptSignal (is it?)
Why do these two methods (Wait() and Connect()) not show up as inherited methods when reading about an RBXScriptSignal-class event (i.e… :RenderStepped()), like how other classes show their inherited methods (i.e :FindFirstChild on any instance)?
I consider myself an experienced lua scripter, and never thought to search there; i’ve never seen it used like that.
This seems particularly bizarre given that wait() is a global method of it’s own, with totally different functionality (wait X seconds vs “fire when this event finishes firing”).
EDIT:
This is news to me, and it seems really useful. I’m guessing this fires 1 frame after the event finishes? Or does it fire on the same frame?