generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Remove GUI Button Script

Previous Thread :: Next Thread 
cheesencrackers5 is not online. cheesencrackers5
Joined: 23 Oct 2010
Total Posts: 291
17 Mar 2012 10:20 AM
local Gui = script.Parent

function onClicked()
script.Parent.Parent.Parent = remove
end
end

Gui.MouseButton1Click:connect(onClicked)

------------------------------------------------------------------------------------

I made this script to delete a ScreenGUI. For some reason, it doesn't work, though. If there are any really dumb mistakes sorry, I'm new to scripting.
Report Abuse
Bannana97 is not online. Bannana97
Joined: 22 Jun 2008
Total Posts: 10215
17 Mar 2012 10:24 AM
Where in your script did you define "remove" ?
I'd assume you want "remove" to be nil.

But if you're looking to use the remove METHOD, do:

script.Parent.Parent.Parent:Remove()
Report Abuse
cheesencrackers5 is not online. cheesencrackers5
Joined: 23 Oct 2010
Total Posts: 291
17 Mar 2012 10:26 AM
Ah, thanks. I knew I did something stupid, but I just couldn't put my finger on it.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image