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
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.
--Put this in a locascript inside a TextButton inside the frame script.Parent.Parent.Visible = false wait(180) script.Parent.Parent.Visible = false