Clickdetector not making UI visible when clicked

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? I want the UI to pop up when the click detector is clicked

  2. What is the issue? Include screenshots / videos if possible! The UI shows as enabled and visible but it’s not showing up in game

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    i tried debug the code

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

local MusicBox = game.Workspace.ClickableBox
local ClickDetector = game.Workspace.ClickableBox.ClickDetector
local SONG_UI_Screen = game.StarterGui.SONGUI
local Frame = game.StarterGui.SONGUI.Frame
local TextBox = game.StarterGui.SONGUI.Frame.TextBox
local Players = game.Players
	ClickDetector.MouseClick:Connect(function(Click)
		-- if clicked
		print("Clicked")
		SONG_UI_Screen.Enabled = true
		Frame.Visible = true
	TextBox.Visible = true
	end)

So i’m having issues with my UI not showing when the click detector is clicked it prints out clicked but the ui does not show even though in game it says the ui is visible

You’re changing game.StarterGui rather than the player.PlayerGui, in theory it should work if you’re making it visible on the PlayerGui rather than the StarterGui.

Ok this is a server script not a local so how would i go about getting the player Gui in a server script?

MouseClick is cool because it provides a parameter of the player who clicked the ClickDetector. Try something like this and let me know how it works out for you.

I just copy and pasted your previous script and made a few edits to this.

local MusicBox = game.Workspace.ClickableBox
local ClickDetector = game.Workspace.ClickableBox.ClickDetector


ClickDetector.MouseClick:Connect(function(plr)
	local plrGui = plr.PlayerGui
	local SONG_UI_Screen = plrGui.SONGUI
	local Frame = SONG_UI_Screen.Frame
	local Box = Frame.TextBox
	
	SONG_UI_Screen.Enabled = true
	Frame.Visible = true
	Box.Visible = true
end)