Storm gui appear issue

I am making a gui to appear and loop over and over again but its not working

script:

while true do
wait(16)
script.Parent.Visible = true
wait(10)
script.Parent.Visible = false
wait(265)
script.Parent.Visible = true
wait(10)
script.Parent.Visible = false
end

We need some more information to help properly here. If you wouldn’t mind, please attach an image of the Explorer hierarchy of what you’re working with so I can give some ideas of what may be the issue.

As a side note, consider using random waits. Might give better effects.

explorer

explorer

All of the contents of StarterGui get replicated inside the player’s PlayerGui when the player joins the game so you should do something like this

local players = game:GetService("Players")
local player = players.LocalPlayer

local frame = player.PlayerGui. --frame path

frame.Visible = true

And nothing is happening at all? I’m assuming the above code is in the LocalScript.

He’s not directly pathing it, he’s just using script.Parent In a LocalScript. There shouldn’t be an issue there.

Is this replacing the script I got know because if so their is no waits in it for it to appear

It works without the loop but with loop it breaks completely

So after 16 seconds it’s just not appearing? I’m struggling to visualize why that would be. Especially if it’s working without the loop.

Here, also optimized it with task.wait() which you should use instead of wait() as it’s confirmed to be more reliable and fast

local players = game:GetService("Players")
local player = players.LocalPlayer

local frame = player.PlayerGui. --frame path

while true do
  task.wait(16)
  frame.Visible = true
  task.wait(10)
  frame.Visible = false
  task.wait(265)
  frame.Visible = true
  task.wait(10)
  frame.Visible = false
end

Yeah exactly what you said im confused to

I’m curious to see if this works for you

Output says this

Players.3DRobloxGameDev.PlayerGui.ScreenGui.Warn.LocalScript:6: Expected identifier, got ‘while’

As in me only being able to see it because if so then no because 1 of my other developers could see it to

have you put the frame’s path?

Rename your ScreenGui to “Storm” and change the indicated line to local frame = player.PlayerGui.Storm

haven’t tested to be honest but I believe this should work

Indicated line as where the script.parent.visible is

The code that Souly sent would replace yours. That suggestion was based off of the idea that you had overwritten yours with what he sent.

Just tested and confirmed it works just be sure to put the right path to the frame