I made a way to make NPC type that actually works, but to make it talk, I paste it as much times as the number of characters in the sentence, and then make it so after 0.05 seconds it types another character. Is there a faster way instead of removing a character from the text every time? (This is a LocalScript, so it can work with filteringenabled.)
function onClick3(plr)
local text = plr.PlayerGui.TalkGui.Message3.TextLabel
text.Parent:TweenPosition(UDim2.new(0.3,0, 0.623,0),'Out', 'Quad', 0.23) -- gui pops up
wait(0.25)
sound:Play() -- talking sound plays
text.Text = ""
wait(0.05)
text.Text = "D"
wait(0.05)
text.Text = "Do "
wait(0.05)
text.Text = "Do y"
wait(0.05)
text.Text = "Do yo"
wait(0.05)
text.Text = "Do you "
wait(0.05)
text.Text = "Do you l"
wait(0.05)
text.Text = "Do you li"
wait(0.05)
text.Text = "Do you lik"
wait(0.05)
text.Text = "Do you like "
wait(0.05)
text.Text = "Do you like b"
wait(0.05)
text.Text = "Do you like be"
wait(0.05)
text.Text = "Do you like bei?"
wait(0.05)
text.Text = "Do you like bein"
wait(0.05)
text.Text = "Do you like being "
wait(0.05)
text.Text = "Do you like being c"
wait(0.05)
text.Text = "Do you like being cl"
wait(0.05)
text.Text = "Do you like being cla"
wait(0.05)
text.Text = "Do you like being clas"
wait(0.05)
text.Text = "Do you like being class"
wait(0.05)
text.Text = "Do you like being classy"
wait(0.05)
text.Text = "Do you like being classy?"
sound:Stop()
wait(0.1)
text.Parent.Buttons.Visible = true -- answer buttons pop up
end
workspace.Classynoob_lol.Torso.Click.MouseClick:Connect(onClick3) --connection

1 comment
I give you a challenge: Make a function that accepts an argument that is any string, The function will take the string and display each character one by one, based on how long it is and how much type you make it delay. This could be fun! :D