Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Whats wrong with this?

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)

2 comments

0

Is there any error?

0

Did you put "HIAC" in StarterGui?

1 answer

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

2 comments

0

thx

0

Didn't work my friend said something cause a parent.

This discussion is preserved as it was. New answers, comments, and votes are closed.