So I want to make a NPC saying dialogs and the text appears letter by letter. I already know how to, but I also want to make them dissapear letter by letter. Here's my appearing letter script:
local text = "Hello!" for i = 1, #text do script.Parent.Parent.Dialog.TextLabel.Text = string.sub(text, 1, i) wait(0.1) --This is the speed of the text end
Help will be REALLY appreciated!
You can basically just reverse your loop, and that's your disappearing script.
for i = #text, 1, -1 do -- The third value here is the direction/step size of your loop script.Parent.Parent.Dialog.TextLabel.Text = string.sub(text, 1, i) wait(0.1) --This is the speed of the text end