Gui not appearing when button clicked

When I clicked the credits button to make the credits gui appear it doesn’t


local Button = script.Parent
local CreditsGui = game.StarterGui.CreditsGui

	CreditsGui.Enabled = true


The issue lies with how your CreditsGui variable is declared. You’re accessing the GUI inside of the StarterGui folder and not the one inside of the players PlayerGui folder. When a player joins the game all of the GUIs inside the StarterGui folder are copied to the PlayerGui folder. If your script is a LocalScript you can get the correct GUI like this:

local CreditsGui = game.Players.LocalPlayer.PlayerGui.CreditsGui
1 Like

It worked thank you so much!
(30 words)

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.