0

# Button lets me click once but wont after the second?

When I click a part in the workspace it is supposed to show a frame but it works one time then when you close the frame and try to click the part again it wont show here is the code to the part that shows the frame (Script)

local cd = script.Parent.ClickDetector

cd.MouseClick:Connect(function(click)
local player = game.Players:FindFirstChild(click.Name)
player.PlayerGui.Heist1GUI.Code.Visible = true
end)


Here is the code that hides the frame (LocalScript)

local frame = script.Parent
local ex = script.Parent.Exit

ex.MouseButton1Click:Connect(function(click)
frame.Visible = false
end)