So, I have this typewriter text animation script for dialogue which uses a screengui in my upcoming game. But i don't know how to make it only appear when someone walks over a part, and how can i make it delete or de-activate itself after it's done typing?

ScreenGui > Frame > LocalScript, TextLabel

Script: local text = "Test" for i = 1, #text do script.Parent.TextLabel.Text = string.sub(text, 1, i) local cor = coroutine.wrap(function() local Sound = Instance.new("Sound") Sound.Volume = .5 Sound.SoundId = "rbxassetid://177266782" Sound.Parent = script.Parent.Parent Sound:Play() Sound.Ended:Wait() Sound.Destroy() end) cor() wait(0.07) end

I know it has something to do with Touch Events But i don't know exactly how to use them, Please help.

Sorry for my bad english im romanian

1 comment