Script not working

Hi all
i was making a script in which when a note is clicked it will appear on the left side of the player’s screen but for some reason that’s not happening

the script

local Clickf = game.Workspace.Notef.ClickDetector
local Clickh = game.Workspace.Noteh.ClickDetector
local Clickc = game.Workspace.Notec.ClickDetector
local Clickb = game.Workspace.Noteb.ClickDetector

Clickf.MouseClick:Connect(function()
	script.Parent.Fa.Visible = true
end)

Clickh.MouseClick:Connect(function()
	script.Parent.Ha.Visible = true
end)

Clickc.MouseClick:Connect(function()
	script.Parent.Ca.Visible = true
end)

Clickb.MouseClick:Connect(function()
	script.Parent.Ba.Visible = true
end)

if	game.Workspace.Safe.Door.CFrame == game.Workspace.Safe.Door2.CFrame then
	script.Parent.Enabled = false
end

i dont know if the problem is with the naming or something else

thank you!

What’s the message you get in the output?

image
these guis are the out put
when the notes are clicked they should become visible which they dont

Try accessing the players GUI to do this function.

Try this;

local Clickf = game.Workspace.Notef.ClickDetector
local Clickh = game.Workspace.Noteh.ClickDetector
local Clickc = game.Workspace.Notec.ClickDetector
local Clickb = game.Workspace.Noteb.ClickDetector

Clickf.MouseClick:Connect(function(plr)
	plr:WaitForChild("PlayerGui"):WaitForChild("etc etc.").Visible = true -- set your directory
end)

Clickh.MouseClick:Connect(function(plr)
	plr:WaitForChild("PlayerGui"):WaitForChild("etc etc.").Visible = true -- set your directory
end)

Clickc.MouseClick:Connect(function(plr)
	plr:WaitForChild("PlayerGui"):WaitForChild("etc etc.").Visible = true -- set your directory
end)

Clickb.MouseClick:Connect(function(plr)
	plr:WaitForChild("PlayerGui"):WaitForChild("etc etc.").Visible = true -- set your directory
end)

if game.Workspace.Safe.Door.CFrame == game.Workspace.Safe.Door2.CFrame then
	script.Parent.Enabled = false
end

As @Pixelctrl said above,

You need to access the Ui from the PlayerGui.

You can’t directly visible the Ui if it is not on PlayerGui( unless you have a billboard , thats something else).