I'm right now trying to create a typewriter effect based on a click event in my test roblox game.
I've got the click event pinned down, But I need to know how I can get a typewriter effect working once I click something.
Here is the code I'm using
local clickdetector = script.Parent:WaitForChild("ClickDetector")
clickdetector.MouseClick:Connect(function()
game.StarterGui.Typewritertext.TalkingText.Text = "This is simply, a test."
for i = 1, #text do
script.Parent.Parent.Dialog.TextLabel.Text = string.sub(text, 1, i)
wait(0.04)
end
end)
Thank you!

1 comment
whats the problem? this looks like it would work.