Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I make it so it displays each letter of my name as if typed out?

I've made a GUI that welcomes you into the game when you join. It has a keyboard "animation" and types out the letters of your name, saying "Welcome, NAME!"

I've done the Welcome part which was easy, but I'm stuck on the name. I think it's something to do with a table but not quite sure. So we're on the same page here, I am making it so it is like this:

W We Wel Welc Welco Welcom Welcome

Anyways, here's my current code!

--Variables
local plr = game.Players.LocalPlayer
local welcomeMessage = script.Parent.welcomeMessage


script.Parent.ResetOnSpawn = false


--Functions
function welcome()
	wait(1)
	welcomeMessage.Text = "W"
	wait(0.07)
	welcomeMessage.Text = "We"
	wait(0.07)
	welcomeMessage.Text = "Wel"
	wait(0.07)
	welcomeMessage.Text = "Welc"
	wait(0.07)
	welcomeMessage.Text = "Welco"
	wait(0.07)
	welcomeMessage.Text = "Welcom"
	wait(0.07)
	welcomeMessage.Text = "Welcome"
	wait(0.07)
	welcomeMessage.Text = "Welcome,"
	wait(0.07)
	welcomeMessage.Text = "Welcome, "
	wait(0.07)
	welcomeMessage.Text = "Welcome, " .. plr.Name[3]
end

if welcomeMessage.Visible == true then
	welcome()
end

1 answer

Hello! removing the "[3]" from the line where you add the player name fixes the issues. But maybe there's a reason I'm not seeing for it being there? Also I recommend actually animating the text instead of using waits and manually setting the text.

Here's the link to that:

https://developer.roblox.com/en-us/articles/animating-text

Hope this helps!

2 comments

0

I was trying to use index so [3] would be the 3rd letter I think. So it would display the 3rd letter of the players name (as an example, wouldn't be the 3rd letter in the real script).

0

Ohh i've never tried to do somethin like that before. But it seems you might be doing it wrong?

This discussion is preserved as it was. New answers, comments, and votes are closed.