Why isn't my GUI appearing?

Hi, i’m new to scripting. I need your help.
My GUI won’t appear even though it says it’s enabled.
The frame is already set as visible in explorer.

script.Parent.ClickDetector.MouseClick:Connect(function()
	
	game.StarterGui.TicketGUI.Enabled = true

end)

That’s because you are changing the gui from the StarterGui, which is like a storage.

You actually want to reference the LocalPlayer’s PlayerGui instead. Since that is the gui that is currently being visible to the player.

2 Likes
 local ClickDetector = workspace.ClickDetector -- the click detector obj
local GUI = game.Players.LocalPlayer:WaitForChild("PlayerGui").GUI.Frame -- This is just the gui object
--local script:
ClickDetector.MouseClick:Connect(function()
	GUI.Visible = true
	GUI.Active = true
	end)

so this should work? But where should I place the TicketGUI then?

1 Like

Try this

script.Parent.ClickDetector.MouseClick:Connect(function(player)
	
    if player then
	    player:WaitForChild("PlayerGui").TicketGUI.Enabled = true
    end

end)
1 Like
script.Parent.ClickDtector.MouseClick:Connect(function(PlayerWhoClicked)
    local PlayerGui = PlayerWhoClicked:FindFirstChildI("PlayerGui")

    PlayerGui.TicketGui.Enabled = true
end)

in your script you are trying to change the gui that appears when other people join (or something like that idk how to explain) and you need to change it from the player

i can recommend a server script in the brick with the following code:

script.Parent.ClickDetector.MouseClick:Connect(function(player)
	player.PlayerGui.TicketGUI.Enabled = true
end)

Leave the TicketGUI in the StarterGui service – the service is a holder for GUIs (and scripts), which are then cloned into a player’s PlayerGui. The PlayerGui is where the GUIs are shown/rendered on the player’s screen.