Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to make it where this textlabel only does the typewriting effect when visible? [ANSWERED]

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!

1 answer

Oh, never mind! I came up with it myself, but thanks to anyone who planned on helping!

I just made the script disabled and made the second script undisabled it.

Thanks again!

This discussion is preserved as it was. New answers, comments, and votes are closed.