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

Why doesn't this script prevent the GUI from reapearing?

I need a script, that makes sure my GUI startup menu thingy doesn't reaper. I tried this code;

-- Main controller for the GUIs



Image = script.Parent.ImageLabel
TutorialAsk = script.Parent["Would you like to take the tutorial?"]
GUIYes = script.Parent.Yes
GUINo = script.Parent.No
Val = game.Workspace.Value.Value
while true do
wait(.1)
-- Loads the intro
if Val == 0 then
	Image.Visible = true

	wait(4)

	Image.Visible = false
	TutorialAsk.Visible = true
	GUIYes.Visible = true
	GUINo.Visible = true
	Val = Val+1
end
end

I used the values, because it is a 1 player game. Pls include step by step explainations. Here is how my tutorial is laid out; http://gyazo.com/5790f2db72cdc994d241d77c9097f6f0

The tutorial 1st shows a GUI that tells who made it, then asks the player if they want to take the tutorial.

If they say no, then it goes to the "Play" screen. If they say "yes" then it gives an explanation of the game, and then goes to the play screen.

What I am looking for, is a script that make the whole thing disappear when the player presses "Play". When the player dies, it does not show up again.

Pls help

1 answer

Well, to do so, you can simply clone the GUI to their PlayerGui when they FIRST enter the game. Put the desired GUI in Lighting.

game.Players.PlayerAdded:connect(function(p)
	GUI = game.Lighting["GUI Name Here"]
	repeat wait() until p.PlayerGui
	GUI:clone().Parent = p.PlayerGui
end)

2 comments

0

Doesnt work for some reason...

0

Try now

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