Errors with Frame GUI Popping Up

Ok, so I am trying to make my script allow A certain Frame to turn visible. But, it is not showing up. How could I fix this?

-- Current Code
game.ReplicatedStorage.Dialogue:FireAllClients(game.Workspace.Soldier, "!") -- NPC talking to players..
wait(10)
game.StarterGui.EatGUI.GameFrame.Visible = true 
wait(5) -- Waits 5 Seconds Before the Frame becomes invisble
game.StarterGUI.EatGUI.GameFrame.Visible = false

Could anyone help me with my issue? (Btw, it is showing up on Server side, and not client.)

1 Like

Use PlayerGui that can only be accessed from the client, so I recommend making another remote event.

You’re trying to change the visibility of a frame inside StarterGui
StarterGui contains stuff that is given to you when you spawn.
If you want to edit your current gui, instead of game.StarterGui you have to index game.Players.LocalPlayer.PlayerGui

Instead of trying to change player’s guis through StarterGui, you may have to do it through Player.PlayerGui.

It is extremely recommend, that you do it from the Client, but you can edit it each player’s individual GUIs from the Server as well.

For example:

Player.PlayerGui.EatGUI.GameFrame.Visible = true

So instead of saying game.StarterGUI

I would do game.Players.LocalPlayer.GUI?

Use a localscript in starter gui
and then simply say

script.Parent

then go on from there and make stuff visible/invisible

1 Like

would I just place it in the StarterGUI or would I place it in the screen Gui?

startergui, if you want it in the screen gui then you can do script.Parent.Parent to get to the startergui

So this will work If I am trying to make the frame visible at a certain point?

Yes because you are accessing the players gui’s not the startergui, basically the same thing but the player gui is a clone of startergui replicated to all players

ok I will try once again
(30 chars)

Thanks, I got it working now.

(30 chars)

No problem :D, glad to help! _