Hi! I want to make a script that will cause the typewriter text to happen when a tool is activated. Currently, the textSound activates but the actual text doesn't change. Here is the script I tried
local text = StarterGui.Apple.Frame.TextLabel
local talkSound = script.talkSound
local function onActivated()
local function writeText (message,WaitTime)
text.Text = " "
text.Visible = true
for i = 1, #message, 1 do
talkSound:Play()
text.Text = string.sub(message,1,i)
task.wait(WaitTime)
end
end
writeText("So, you really wanna know?", 0.08)
end
script.Parent.Activated:connect(onActivated);```
I'm new to scripting, so it may be a random tiny mistake.
** You are now Level 7! **