Cannot make frame visible through scripts

Hello! I’m kinda in a roadblock here because I tried to create a script that makes it so that a few seconds after i join the invisible frame becomes visible. However, it won’t work. I tried to find solutions to this by looking at dev forum posts and its really hard to find a working solution. Most of the things i’ve tried just didn’t work. Here is my script that I tried to do.

local testdia1 = game.StarterGui.testdia1 -- test dia is screen gui


wait(7)
print('Attempting, Please wait!')

testdia1.TextLabel.Visible = true

testdia1.TextLabel.Text = 'So you came? Waiting for all players.'

if testdia1.TextLabel.Visible == true
then
print('Script Running')	

else

		print('Script broken')
  end

I tried putting it in other places, including starterplayerscripts, startercharacterscripts, startergui(screengui), workspace, replicatedfirst, replicated storage, and workspace. It’s currently a local script. If there’s anything im doing wrong, please tell me.

My second attempt was the same thing, except through a playeradded function. However, it did no use.

Are you waiting the 7 seconds to see if it actually became visible also make sure the Gui.Enabled = true

When I tried Gui.Enabled = true, it said Gui.Enabled = true, however, it still didn’t work. By the way, when I checked out my properties, it said that frame and textlabel was visible.

Also I recommend that you use local gui = game.Players.LocalPlayer.PlayerGui.testdial as you are referencing the one in StarterGui compared to the one on screen.

Is something above the label? or is the labels position out of the area to see it?

Well its on the same position. When I tried to enable the textlabel as visible before I went on the game, it worked. However, when I didn’t, no go.

I also tried that yet it didn’t work for some reason.

should be
local testdia1 = game.Players.LocalPlayer.PlayerGui.testdia1
and after that you can try
testdia1.Enabled = true

The only issue I can see, is that your trying to get the label from which the client can’t see.

Which @Sartorra has said with " game.StarterGui.testdia1" because its not in the Players screenGui.

Screen Shot 2020-06-07 at 2.24.35 PM

Weird. It said testdia1 isn’t a valid member of PlayerGui. Maybe I have to change it from a local script to a regular script?

I don’t understand what you’re trying to say. Can you elaborate on that? I mean, testdia1 is in startergui.

You wrote down testdial instead of testdia1

Is “testdia1l” loaded in the screengui?
And what is the class of testdia1l?

It’s a glitch. Its hard to take a screenshot of something that small. I’ve rechecked the scripts and I can assure you its testdia1.

Off topic, Happy cakeday! 30 chars

Thank you,

Try using game.Players.LocalPlayer.PlayerGui:WaitForChild(“testdia1”)

1 Like

testdia1 is in the class of screengui, already checked.

Wow, it works! Thank you very much!

1 Like

NP 30Charrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrs

1 Like