Typewriter text too slow

I want to have my typewriter function type a string on any length pretty much instantly.

Even when the wait is just wait() it still takes a considerable amount of time to type each word

I have tried removing the wait entirely, but as expected , it would type the text instantly with no typewriter effect at all.

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

Is there anything faster I can use then while wait()?

Here is my function

function write(message, label)
    	local cr = coroutine.create(function()
    		for i = 1, #message do
    			label.Text = string.sub(message, 1, i)
    			wait() --This is the speed of the text
    		end 
    	end)
   coroutine.resume(cr)
end
1 Like

You can use delay that makes thread:

local speed = 0.05 --speed
function write(message, label)
  for i = 1, #message do
    delay(i*speed, function() --this function will start as thread after i * speed secounds
      label.Text = string.sub(message, 1, i)
    end)
  end 
end
1 Like

Try using RunService.Heartbeat:Wait() as it should be considerably faster.

1 Like