Why isnt this script working?

I’m trying to make another gui visible when I click a button but its not working

local button = script.Parent
local statsGui = game.StarterGui.SettingsTab.Frame
button.MouseButton1Click:Connect(function()
	print("Should work")
	statsGui.Visible = true
	print("Worked")
end)

image

You’re calling the startgui, you need to be calling the PlayerGui.

2 Likes