Hello,
how do i make a text appear letter for letter, i saw much games using it but i want to know how, i'm a pretty good scripter but i can't do this
Hello,
how do i make a text appear letter for letter, i saw much games using it but i want to know how, i'm a pretty good scripter but i can't do this
I'm pretty sure you have to do this manually every time you want different text so here's a basic function
Basically how my script works is there's a value put in the player when they join and the script checks if that bool value is set to true and if it is, then it runs the function
local text = script.Parent
local player = game.Players.LocalPlayer
function() Text1
text.Text = "h"
wait(0.2)
text.Text = "he"
wait(0.2)
text.Text = "hel"
wait(0.2)
text.Text = "hell"
wait(0.2)
text.Text = "hello"
wait(0.2)
text.Text = "hello w"
wait(0.2)
text.Text = "hello wo"
wait(0.2)
text.Text = "hello wor"
wait(0.2)
text.Text = "hello worl"
wait(0.2)
text.Text = "hello world"
wait(0.2)
end
while wait(1) do
if player:FindFirstChild("Load").Value = true then
Text1()
player:FindFirstChild("Load").Value = false
end
end
You can simply use a loop with the string you want it to spell out in the end. I posted a small example below for you to integrate into your own script. Note: posting anything you've tried is a hell of a lot better than simply saying you can script.
local str = "hello world!"
local text = script.Parent -- Assuming that the text displayer is the script's parent
for i=1,string.len(str) do
wait()
text.Text = string.sub(str,1,i)
end
If you need any more help, feel free to ask!
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
Thats kinda unefficient, you could probably use some string methods and loops.