i wanna do that will do it when clicket again it should go the visible false but it dint i put here the one wath i tried
local Plr = game.Players.LocalPlayer
Plr:GetMouse().KeyDown:Connect(function(M) if M == "m" then script.Parent.Visible = true if Plr:GetMouse().KeyDown:Connect(function(M) then script.Parent.Visible = false end) end end end)

1 comment
it looks like you are getting the mouse but then using keydown. You should use userinputservice for keypresses.