I want to make a realistic typewriting system, here’s my script.
local message = "Detail, Detail2, Detail3, Detail......."
for i = 1, #message do
script.Parent.Type.PlaybackSpeed = math.random(5,15)/10
script.Parent.Type:Play()
if i+1 == "," or i+1 == "." then
script.Parent.TextLabel.Text = string.sub(message, 1, i)
wait(1)
else
script.Parent.TextLabel.Text = string.sub(message, 1, i)
wait(.1)
end
end
But i cant seem to get it to figure out if the next character is a comma or period
any way of doing this?