Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Hidden GUI not being hidden?

Asked by 6 years ago

I'm having issues trying to make a nuke game with a GUI simulating flash blindness while kicking the player (The player has to enter a teleport to another place within the game before the nuke drops, the teleport being a door to a fallout shelter and the place being a fallout shelter). I have a GUI named nucflash in the starterGUI with a white frame meant to be to be hidden until after 3 minutes, but for some reason it shows up at the beginning of the game! The code is shown here. I hope someone can find a way to fix errors in this and tell me how.

game.StarterGui.nucflash.Frame.BackgroundTransparency=1
wait(180)
game.StarterGui.nucflash.Frame.BackgroundTransparency=0
end
0
That's because when you play the game, the Gui is COPIED from the StarterGui to your Player. When a player is playing in the game, ALL guis inside StarterGui get copied into "PlayerGui" inside their player. sodaghost1 34 — 6y

2 answers

Log in to vote
0
Answered by 6 years ago

When a player enters the game, all Gui's inside StarterGui are copied into the PlayerGui which is inside the player. (game.Players.billybobRAE.PlayerGui.nucflash)

So, to fix this, you would insert a LocalScript into the frame and type the following code.

wait(180)
script.Parent.Visible = false

You also have an 'end' in your script which causes an error as you're not closing off any function, statement, loop, etc. You can also simply use the Frame property, 'Visible' which can either be set to true or false.

Ad
Log in to vote
0
Answered by 6 years ago
--Put this in a locascript inside a TextButton inside the frame
script.Parent.Parent.Visible = false
wait(180)
script.Parent.Parent.Visible = false
0
wouldnt you want visible to be trrue at the end? billybobRAE 41 — 6y
0
also its niot working billybobRAE 41 — 6y

Answer this question