#help with text

18 messages · Page 1 of 1 (latest)

past idol
#

this is my failed attempt:

game.Players.PlayerAdded:Connect(function(player)
    
    local GUI = player.PlayerGui:WaitForChild("ScreenGui")
    local WelcomeString = "Welcome"
    local Text = GUI:WaitForChild("TextLabel")
    GUI.Enabled = true
    local Counter = 0 --the for loop index
    
    for i = 1, #WelcomeString + #player.Name do
        
        Counter    += 1
        
        Text.Text = string.sub(WelcomeString, i, i)
        
        if Counter > 1 then
            Text.Text = string.sub(WelcomeString, 1, Counter)
        end
        
        if Counter > 7 then
            Text.Text = string.sub(WelcomeString.." "..player.Name, 1, Counter + 1)
        end
        
        task.wait(0.05)
    end
    
    task.wait(2)
    
    for i = 1, #WelcomeString + #player.Name do
         Text.Text = string.sub(Text.Text, i, Counter - 1)
        print(Text.Text)
        task.wait(0.05)
    end
end)```
past idol
wind mortar
past idol
#

imma try that

silver waspBOT
#

studio** You are now Level 2! **studio

wind mortar
#

obviously ur gonna need to modify variable names and stuff but thats all u need

past idol
#

yeah well

#

that didn't work

#

cuz it just gave me first letter

#

and that's it

#

I will show you vid

wind mortar
#

add a task.wait() after the loop

#

try now

past idol
#

oh

#

k

#

yeah that works