Hi there! I am wondering how I am able to produce a type writer effect when the text is being played. Also, how can I adjust the speed of the text going out?
Here is my code for trying to implement sounds
local function playSound(sound_id)
local sound = Instance.new("Sound",game.ReplicatedStorage)
sound.SoundId = sound_id
sound.Volume = .1
sound.PlayOnRemove = true
sound:Destroy()
end
local function textAnimate(content) -- Animates each letter
for i=1,string.len(content) do
TextLabel.Text = string.sub(content,1,i)
playSound("rbxassetid://915576050")
if string.sub(content,i,i) == "!" or string.sub(content,i,i) == "." or string.sub(content,i,i) == "?" then
wait(1)
elseif string.sub(content,i,i) == "," then
wait(.5)
else
wait(.05)
end
end
end
Note! This was my own text function BEFORE I started using Defaultio’s module, so how could I modify it to fit into the module?