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)
Making it visible with a server sided script and using a local script to make it invisible would be the problem. The server still thinks that the frame is visible. To fix this, put the code in the same type of script. In your case, it would be easiest to make them both server sided, although I don't recommend using regular scripts for UI.