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

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

Asked by
KingDomas 153
3 years ago
Edited 3 years ago

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

Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

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!

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). KingDomas 153 — 3y
0
Ohh i've never tried to do somethin like that before. But it seems you might be doing it wrong? treex070 35 — 3y
Ad

Answer this question