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 » Scripters
Home Search
 

Re: Destroying ImageButton

Previous Thread :: Next Thread 
yourchoice1 is not online. yourchoice1
Joined: 21 Jun 2013
Total Posts: 91
03 Feb 2016 07:00 PM
Why won't this work? There is multiple octopus, by the way.

local octopus = game.StarterGui.SurfaceGui.Frame.ImageButton

octopus.MouseButton1Click:connect(function()
octopus:Destroy()
end
Report Abuse
yourchoice1 is not online. yourchoice1
Joined: 21 Jun 2013
Total Posts: 91
03 Feb 2016 07:01 PM
there is a parenthesis after the end
the script looks like this

local octopus = game.StarterGui.SurfaceGui.Frame.ImageButton

octopus.MouseButton1Click:connect(function()
octopus:Destroy()
end)
Report Abuse
LilMcManiac is not online. LilMcManiac
Joined: 31 Oct 2011
Total Posts: 2812
03 Feb 2016 07:13 PM
local button
for _, v in pairs(game.Players.LocalPlayer.PlayerGui.SurfaceGui.Frame:GetChildren()) do
if v.Name == "Octopus" then
button = v
end
end

button.MouseButton1Click:connect(function()
button:Destroy()
end)
Report Abuse
yourchoice1 is not online. yourchoice1
Joined: 21 Jun 2013
Total Posts: 91
03 Feb 2016 07:18 PM
didn't work...
Report Abuse
DevelopmentStatus is not online. DevelopmentStatus
Joined: 22 Apr 2015
Total Posts: 235
03 Feb 2016 07:31 PM
script.Parent:remove()
or
script.Parent:Destroy()

???
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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