As you can see the characters tween in position and transparency. I know this is going to require a single TextLabel for each character, TextService, TweenService. But I don’t know how to calculate the positions. Help would be appreciated!
They already know how to apply a simple typewriter effect to text, they just want to know how to achieve the effect seen in the video
iirc, the only way to achieve this is to create a new TextLabel instance for each character which can be confusing, especially when working with RichText.
Yes! The API Documentation is written in comments in the module itself. The 2 ScreenGuis under the module are just examples for you to play with. RichText is referring to the module itself. The module even has an example script below:
local richText = require(richTextModule)
local text = "Hello world!\nLine two! <AnimateDelay=1><Img=Thinking>"
local textObject = richText:New(frame, text)
textObject:Animate(true)
print("Animation done!")
Quick Note: The module supports RichText, not that you have to use it.
Pleasant surprise to see me being mentioned, haha.
As for the effect, it’s quite simple - create a text label for each individual character and then tween them to your liking.
Someone mentioned Defaultio’s module, and while I did try using it at first, I didn’t like how the module was made (the OOP structure in general), so I made my own little short typewriter module.
local message = ""
local TextLabel = --where ever the gui is located
for i = 0, #message do
TextLabel.Text = string.sub(message, 1, i)
end
--this is the simplest way to do it for me
I’m not that experienced in related cases like this, but I’m going to assume you position each TextLabel (unless it’s the first) the same X offset as the X size of the previous TextLabel then offset the TextLabel by a certain number, depending on the spacing your font uses.
There is actually a new property coming to TextObjects soon that allows you to define how many utf8 characters show which will be very useful. I’ll update this post when I find the announcement thread.
What you can do is create a string to start with. For example, your text will be like: local Text_To_TypeWrite = "This is what I want to typewrite."
Then, you will do a function for typewriting like this:
function typewrite(TextLabel,text)
for i = 1,#text do -- We will get the amount of letters in the string.
TextLabel.Text = string.sub(text,1,i) -- We will then type those letters out one by one.
wait() -- We will do a slight wait effect so that it looks like we are typing it out
end
end
A lot of people seem to be missing what OP needs help with, OP wants to achieve the effect seen in the video, so please stop replying with scripts on making typewriters, because that’s not what OP asked for.
@iamajust if any of the posts were what you were looking for, mark it as the solution so people know you've already been helped.