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

Why doesn't this Gui work?

Asked by 9 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

Why doesn't this work?

local i = 1
repeat
    game.StarterGui.Main1.Frame1.Visible = true
    game.StarterGui.Main1.Frame.Visible = true
    game.StarterGui.Main1.TextLabel.Visible = true
    wait(15)
    game.StarterGui.Main1.Frame1.Visible = false
    game.StarterGui.Main1.Frame.Visible = false
    game.StarterGui.Main1.TextLabel.Visible = false
    game.StarterGui.Gamepass.Frame1.Visible = true
    game.StarterGui.Gamepass.Frame.Visible = true
    game.StarterGui.Gamepass.TextLabel.Visible = true
    wait(15)
    game.StarterGui.Gamepass.Frame1.Visible = false
    game.StarterGui.Gamepass.Frame.Visible = false
    game.StarterGui.Gamepass.TextLabel.Visible = false
    game.StarterGui.Credits.Frame1.Visible = true
    game.StarterGui.Credits.Frame.Visible = true
    game.StarterGui.Credits.TextLabel.Visible = true
    wait(15)
    game.StarterGui.Credits.Frame1.Visible = false
    game.StarterGui.Credits.Frame.Visible = false
    game.StarterGui.Credits.TextLabel.Visible = false
until i==2
0
What isn't working? Did you get any type of error in the Output? What about it isn't working? From what I'm seeing, your only changing the properties for 'StarterGui''s version, and not the Players. TheeDeathCaster 2368 — 9y
0
Alpha. The reason it isn't working is because it's not accessing the player's GUI's it's just accessing the StarterGui... BSIncorporated 640 — 9y

1 answer

Log in to vote
1
Answered by 9 years ago

The reason it is not working is because you have it going into game.StarterGui StarterGui isn't seen by the player, so I would suggest putting this script in StarterGui, and changing the script accordingly. If you want all players to see the same things at the same time this isn't correct

local i = 1
repeat --MAKE SURE THIS SCRIPT IS NOT IN WORKSPACE! IT SHOULD ONLY BE IN STARTERGUI
    script.Parent.Main1.Frame1.Visible = true
    script.Parent.Main1.Frame.Visible = true
    script.Parent.TextLabel.Visible = true
    wait(15)
    script.Parent.Main1.Frame1.Visible = false
    script.Parent.Main1.Frame.Visible = false
    script.Parent.Main1.TextLabel.Visible = false
    script.Parent.Gamepass.Frame1.Visible = true
    script.Parent.Gamepass.Frame.Visible = true
    script.Parent.Gamepass.TextLabel.Visible = true
    wait(15)
    script.Parent.Gamepass.Frame1.Visible = false
    script.Parent.Gamepass.Frame.Visible = false
    script.Parent.Gamepass.TextLabel.Visible = false
    script.Parent.Credits.Frame1.Visible = true
    script.Parent.Credits.Frame.Visible = true
    script.Parent.Credits.TextLabel.Visible = true
    wait(15)
    script.Parent.Credits.Frame1.Visible = false
   script.Parent.Credits.Frame.Visible = false
    script.Parent.Credits.TextLabel.Visible = false
until i==2

Added

while ___ do could also be used to make this more efficient. EXAMPLE:

local i = 1
while true do
    wait(1) --I always forget the wait LOL
    if i == 1 then
    script.Parent.Main1.Frame1.Visible = true
    script.Parent.Main1.Frame.Visible = true
    script.Parent.TextLabel.Visible = true
    wait(15)
    script.Parent.Main1.Frame1.Visible = false
    script.Parent.Main1.Frame.Visible = false
    script.Parent.Main1.TextLabel.Visible = false
    script.Parent.Gamepass.Frame1.Visible = true
    script.Parent.Gamepass.Frame.Visible = true
    script.Parent.Gamepass.TextLabel.Visible = true
    wait(15)
    script.Parent.Gamepass.Frame1.Visible = false
    script.Parent.Gamepass.Frame.Visible = false
    script.Parent.Gamepass.TextLabel.Visible = false
    script.Parent.Credits.Frame1.Visible = true
    script.Parent.Credits.Frame.Visible = true
    script.Parent.Credits.TextLabel.Visible = true
    wait(15)
    script.Parent.Credits.Frame1.Visible = false
   script.Parent.Credits.Frame.Visible = false
    script.Parent.Credits.TextLabel.Visible = false
    else
    print 'i isnt 1'
end
end --May need to add one more "end"

Accept the answer if this helped, please, and remember to be more specific in your questions to get accurate answers

If anyone notices something wrong, let me know please.

THANKS!

Ad

Answer this question