Hi, so, I'm making a game and there's a talking gui in it. In the gui, the text does the typewriting effect but the problem is, it runs when it's not even visible. So, how do I fix this? Here's the script:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
-- Require module
local TypeWriter = require(ReplicatedStorage:WaitForChild("TypeWriter"))
TypeWriter.configure({
delayTime = 0.02,
extraDelayOnSpace = false
})
TypeWriter.typeWrite(script.Parent, "You might know me as the artist behind the wildly popular 'Special Agent Comics'.")
In the other script, it makes the thing visible, so why does it run otherwise?
Here's the script that makes it visible:
function leftClick()
script.Parent.Parent.Parent.ImageLabel2.Visible = true
script.Parent.Parent.Parent.ImageLabel2.TheTalkingText.Visible = true
end
script.Parent.MouseButton1Click:Connect(leftClick)
Thank you!
