Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How do I do a typing like affect on text labels?

Asked by 4 years ago

I've seen people have typing text labels, heres a game that has it: https://web.roblox.com/games/3723475719/unnamed?refPageId=e1c4a3ab-a8e3-40f2-9d01-53f3d52ac6d9

So yeah, how do I do that? I have no clue, but I do have the same clue has your grandmother on how to do that.

Thanks!

1 answer

Log in to vote
0
Answered by
compUcomp 417 Moderation Voter
4 years ago
Edited 4 years ago

Continuously add characters to the TextLabel.Text property. In this example I've bound the typing text effect to a BindableEvent. You can change this if you like.

local final = "Hello World!"
local label = script.Parent
local event = Instance.new("BindableEvent") -- don't set the parent yet
event.Name = "TypeLabel"
event.Event:Connect(function ()
    label.Text = ""
    for i = 1, string.len(label.Text) do
        wait(0.1)
        label.Text = label.Text .. string.sub(final, i, i)
    end
end)
event.Parent = label
Ad

Answer this question