Hey there, new scripter here.
I'm making a short story based game similar to the likes of Camping ect,
And was wondering if there is a way to "Pause" a gui/code from carrying on until i manually call for it?
Right now im just using wait()'s and putting in random seconds but i need something more reliable?
Once these 3 strings are finished i want it to be "Paused" until i Touch a part which will carry on the script when i add more Strings to it later
-- Roblox services
local dialogGui = script.Parent
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local object = script.Parent
-- Require module
local TypeWriter = require(ReplicatedStorage:WaitForChild("TypeWriter"))
wait(0.1)
TypeWriter.typeWrite(script.Parent, "Welcome students, I hope you enjoy your stay!")
wait(1)
TypeWriter.typeWrite(script.Parent, "Why don’t you get started by heading upstairs for some classes")
wait(1)
TypeWriter.typeWrite(script.Parent, "It’s the first door on the left")
wait(1)
object.AnchorPoint = Vector2.new(0, 0)
object.Position = UDim2.new{0, 0},{0, 0}
object:TweenPosition(UDim2.new(0, 0, -10.04, 0), Enum.EasingDirection.In, Enum.EasingStyle.Sine,0.5)
wait(2)
script.parent.Visible = false
if script.parent.visible == false then print("Worked!")
end
Thanks,

9 comments
debounce. local deb = while true do return end
ohyeah otherwise idk
How would i apply this to say the likes of, When a player touches a part the script would carry on?
delay(1, function()) end)
suspectshot108, Were would i put that inside of to trigger and how do i call on it to carry on my Scripts?
you could also fire a bindable/remote event when a certain criteria is met
theking48989987, What would that do exactly? Sorry im super new
There are simple answers and complex answers on how to do this - it really depends on the context. Can you post the code you want to improve? (You can edit your post)
Done. Sorry if its alot to look at