I made a GUI that when you click it a map comes up and when u click the red button it removes. (The remove wont work.)
``function onClick() if game.Workspace:FindFirstChild("HIAC") then game.Workspace.HIAC:Remove() end
script.Parent.MouseButton1Click:connect(onClick)
First, please put your code in the "lua area". Your one would be
function onClick() if game.Workspace:FindFirstChild("HIAC") then game.Workspace.HIAC:Remove() end
Your problem is that, you missed out an end
function onClick() if game.Workspace:FindFirstChild("HIAC") then game.Workspace.HIAC:Remove() end end