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

How do you end an IntroGui, or better, a LocalScript regarding it?

When I created my intro, adding what I want and little details and such, the Intro Gui doesn't seem to end. So now all I have is a white screen after the intro's done. I tried ending the script with "end" but that didn't work. Also, I'm an amateur, I know not much of scripting.

Here's a copy and paste of the LocalScript. If anyone knows what's wrong, please tell me. Or you don't have to, I'm not forcing anyone.. But help would be nice :)

local ReplicatedStorage = game:GetService("ReplicatedStorage")
 

local TypeWriter = require(ReplicatedStorage:WaitForChild("TypeWriter"))
 
wait (5)
TypeWriter.typeWrite(script.Parent, "...")
wait (5)
TypeWriter.typeWrite(script.Parent, "He's dead.")
wait (9)
TypeWriter.typeWrite(script.Parent, "...")
wait (3)
TypeWriter.typeWrite(script.Parent, "I don't believe them, not one bit.")
wait (3)
TypeWriter.typeWrite(script.Parent, "I bet he's out there, waiting for me.")
wait (9)
TypeWriter.typeWrite(script.Parent, "...")
wait (3)
TypeWriter.typeWrite(script.Parent, "I'm going to find him.")
wait (3)
TypeWriter.typeWrite (script.Parent, "Will you help me?")
wait (9)
 
local textLabel = script.Parent
 
local function fadeOut()
	for i = textLabel.TextTransparency, 1, .1 do
		wait(.1)
		textLabel.TextTransparency = i
	end
end
 
local function fadeIn()
	for i = textLabel.TextTransparency, 0, -.1 do
		wait(.1)
		textLabel.TextTransparency = i
	end
end
 
local lastIndex
while true do

	fadeOut()
	
	
	local index	
	repeat
		index = math.random(1, #content)
	until lastIndex ~= index
	
	lastIndex = index
	
	
	textLabel.Text = content[index]
	fadeIn()

end

1 comment

0

You can always disable the script, which is a property of local and server scripts, using script.Disabled = true. This will completely shut down the script so it can't do anything. I'm not sure if this is what you were looking for, but I hope it can help you.

2 answers

you can set the Gui's "Enabled" property to false at the end of the script using

-- i'm assuming your Gui is the script.parent, reference it however though
script.Parent.Enabled = false

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