Hello! So here is something that I made that when the brick is clicked, a GUI becomes visible but when I click it, it doesn't appear and nothing appears in the output logs.
function onClicked() game.StarterGui.StoreGUI.ShabbyMall.ScreenGui.Background.Visible = true end script.Parent.ClickDetector.MouseClick:connect(onClicked)
I did this to the script to check if it works. It does.
function onClicked() game.Workspace.Baseplate:Destroy() end script.Parent.ClickDetector.MouseClick:connect(onClicked)
So what am I doing wrong in the first script? And this is not FE.
You needed to show the hierarchy for us to easily understand the problem and fix it Btw connect is deprecated, use Connect
function onClicked(hit) local player = game.Players:GetPlayerFromCharacter(hit.Parent) if hit and hit.Parent and player then player.PlayerGui.StoreGUI.ShabbyMall.ScreenGui.Background.Visible = true -- Check if Visible is in the properties else print("Nil") end end script.Parent.ClickDetector.MouseClick:Connect(onClicked)
Please submit this answer if this helped