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.
Search for “advanced fall in place animation” in Google and you will see a devforum post, it will explain everything on how to do it, it will tell you about a module BTW, you will edit a small part of it.
local text = "your text here!"
local textLabel = "" -- put your textlabel here
for i = 1, #text do
textLabel.Text = string.sub(text, 1, i)
if string.sub(text,i,i) == "!" or string.sub(text,i,i) == "?" or string.sub(text,i,i) == "." then
task.wait(1)
else
task.wait(0.05)
end
end
I’ve managed to do a similar effect a while ago. For it to work properly, you shouldn’t be using the Text property but MaxVisibleGrapeheme instead.
Here’s the function I used:
function module.DisplayText(Content: string, Choices)
ContentTextLabel.Text = ""
module.ShowMainFrame()
Content = Content or ">> NPC process stopped unexpectedly. <<"
for i = 1, #Content do
ContentTextLabel.Text = string.format("<stroke>%s%s%s%s</stroke>%s",
string.sub(Content, 1, i - 3),
string.format('<font transparency="0.25">%s</font>', Content:sub(i - 2, i - 2)),
string.format('<font transparency="0.5">%s</font>', Content:sub(i - 1, i - 1)),
string.format('<font transparency="0.75">%s</font>', Content:sub(i, i)),
-- string.format('<font transparency=".75">%s</font>',
-- i<#Content and module.GenerateRandomCharacter() or ""),
string.format('<font transparency=".99">%s</font>', Content:sub(i+1, #Content))
)
local CurrentCharacter = Content:split("")[i]
if CurrentCharacter ~= " " and CurrentCharacter ~= "." then
module.PlaySoundAtSpeed("press_button_ui", 1)
end
wait(0.06)
end
ContentTextLabel.Text = Content
end