Advertisement
OnFireRobloxScriptin

Typewriter Effect Script

Jun 23rd, 2025
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.61 KB | None | 0 0
  1. --//Variables
  2. local textLabel = script.Parent:WaitForChild("Message") --Reference your TextLabel
  3. local message = "Welcome to the game!" --Your message
  4. local speed = 0.05 --Speed in seconds per character
  5.  
  6. --//Functions
  7. local function typewriter(textLabel, fullText, typingSpeed)
  8.     textLabel.Text = "" --Clear text first
  9.     for i = 1, #fullText do --Loop through every letter in your message
  10.         textLabel.Text = string.sub(fullText, 1, i) --Sub in the message to its current index
  11.         task.wait(typingSpeed) --Wait your typing speed
  12.     end
  13. end
  14.  
  15. task.wait(3)
  16. typewriter(textLabel, message, speed)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement