So i want to use a ClickDetector for when a part (the ClickDetector's parent) is clicked, make a Gui pop up/appear. So far this is what i have: (in a LocalScript)
script.Parent.ClickDetector.MouseClick:connect(function()
if workspace.Part.Transparency == 0 then
for i,v in pairs(game.Players:GetPlayers()) do
v.PlayerGui.Gui.Menu.Visible = true
print("Gui opened.")
end
end
end)
That's what i wrote, and it didn't pop up! Can you tell me why plz? Thx

1 comment
You shouldn't be running the function through the ClickDetector, since it is just so there is a cursor and the Mouseclick fires when it's clicked. Also, I recommend using MouseButton1Click instead.