GUI Not showing when ordered to by a script

So I have made a simple script where if an IntValue is equal to 8 a GUI will be visible and if not, it will be invisible, however even though the visibility property is checked the GUI doesn’t show

( This is inside a regular script )

local PumpkinValue = game.Workspace.PumpkinValue
local ScreenGui = game.StarterGui.ScreenGui
local PumpkinEndingGUI = ScreenGui.EndingFrame

--Loops the function so it checks every .5 seconds
while wait(.5) do
	--Main function
	if PumpkinValue.Value == 8 then
		PumpkinEndingGUI.Visible = true
		PumpkinEndingGUI.Visible = false

This is while running the game
You can see that the value is checked but the gui doesn’t show:

I have not seen any solutions to this any help would be appreciated!

Is the ScreenGui that the frame is parented to enabled?

Yes it is, I still have this error though.

You’re turning on the UI that is inside game.StarterGui. Turn on the one that is inside game.Players.LocalPlayer.PlayerGui.

1 Like