Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Whats wrong with this?

Asked by 9 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

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)

0
Is there any error? BlueTaslem 18071 — 9y
0
Did you put "HIAC" in StarterGui? xAtom_ik 574 — 9y

1 answer

Log in to vote
1
Answered by
xAtom_ik 574 Moderation Voter
9 years ago

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
0
thx coolaidisgood69 0 — 9y
0
Didn't work my friend said something cause a parent. coolaidisgood69 0 — 9y
Ad

Answer this question