Typewriter Effect

Heyo, developers!

I do not know if anyone would make use of this because of how relatively easy it is to make, but hey. This is basically an open-sourced system that typewrites strings onto a GUI. And yes, this can process numbers, symbols, and emojis.

It runs with one script, and for the most part, is heavily documented.

Note: You’re not required to credit me but if you have a youtube channel featuring this tutorial please do so.

Here’s a link to the uncopylocked place and remember to play around and change stuff up! Happy developing. :slight_smile:

Cheers m8s!

27 Likes

I would opt firstly to keep the text a constant size, and secondly to make sure previously written text doesn’t move from its original spot. By the way, the white-on-pink combo makes it difficult for people with compromised eyesight to read.

1 Like

Thank you, I’m going to be using this for my games until I learn to create a typewriter for myself!

1 Like

If you want it to feel more natural, I would recommend adding a delay in between punctuation such as commas, periods, etc.

1 Like

Don’t use wait() in production. The delay it results strongly depends on current load, with 0.03 of a second ranging from 0.03 to infinity.

Use a heartbeat loop instead.

3 Likes

Great resource, although there is really no point to open source a whole game that requires the launching of studio when you can just do:

--[~[ Put inside the TextLabel! ]~]--
local final = "Hello, world!" -- the final text of the typewriting
local delay = 0.1 -- the delay (in seconds) that a letter will be outputted

for i = 1,#final do
script.Parent.Text = string.sub(final,i,1)
wait(delay)
end

That is just 7 lines, and it can be shortened down to 4.

10 Likes

You see this was just for resource sake because people might want to implement it. However, you have a great point there, will definitely take this into consideration when making my own games, Cheers!

Ahh, I see!

Funny thing is, I was wondering what a heartbeat loop was and watched a RunService tutorial by the “TheDevKing”'! (I understand it clearly now) Thanks for the constructive criticism and will definitely take it into consideration next time.

Aha, I see!

It completely slipped my mind yesterday to just paste the script here. Thanks for your feedback, have a good one!

Glad you like the resource and most of all, thank you for using it in your games. Means a lot personally, thank you and have a good one. :slight_smile:

1 Like

Hey, i’ve tried modifying your script a bit, but only the first letter shows up and then dissapears, do you know why

> script.Parent.Parent.Text.Changed:Connect(function()

wait(0.2)
local final = script.Parent.Parent.Text.Value – the final text of the typewriting
local delay = 0.2 – the delay (in seconds) that a letter will be outputted

for i = 1,#final do
script.Parent.Text = string.sub(final,i,1)
wait(delay)
end
end)

do you know why this happens, if so, could you point out the error (question mark and slash button is broken)

5 Likes

Just saw this, for support for RichText I’d highly recommend this module. It’s more than a single function and has served my projects very well

1 Like

Also You can use this too! Animating Text Module