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: Text Button

Previous Thread :: Next Thread 
Roboguy51 is not online. Roboguy51
Joined: 26 Feb 2011
Total Posts: 35
01 Jan 2014 11:31 AM
I wrote a script and put it in a textbutton:
local function onClicked()
script.Parent.Parent.TextLabel.TextLabel2:destroy ()
script.Parent:destroy ()
end
script.Parent.MouseButton1Click:connect(OnClicked)
It doesnt work for some reason D: Why?
Report Abuse
iWasted1000Robux is not online. iWasted1000Robux
Joined: 26 Oct 2013
Total Posts: 813
01 Jan 2014 11:31 AM
not great at scripting but I think Destroy is supposed to have a capital letter.

#nerdsunited
Report Abuse
Roboguy51 is not online. Roboguy51
Joined: 26 Feb 2011
Total Posts: 35
01 Jan 2014 11:33 AM
K, I'll try that
Report Abuse
Roboguy51 is not online. Roboguy51
Joined: 26 Feb 2011
Total Posts: 35
01 Jan 2014 11:34 AM
Didnt work :'(
Report Abuse
secretidagent is not online. secretidagent
Joined: 07 Nov 2010
Total Posts: 1600
01 Jan 2014 11:37 AM
function onClicked()
script.Parent.Parent.TextLabel.TextLabel2:remove()
script.Parent:remove()
end
script.Parent.MouseButton1Down:connect(OnClicked)
Report Abuse
TheRobloxian909 is not online. TheRobloxian909
Joined: 08 Aug 2013
Total Posts: 2444
01 Jan 2014 11:40 AM
Theres a spacebar at destroy

its not ':destroy ()'
its ':destroy();
Report Abuse
kingmatt2 is not online. kingmatt2
Joined: 20 Aug 2011
Total Posts: 6494
01 Jan 2014 11:43 AM
Do not do what secet did. Ever..

EEVVEERR.
:remove() is old and glitchy,

Use

:Destroy()


Report Abuse
Roboguy51 is not online. Roboguy51
Joined: 26 Feb 2011
Total Posts: 35
01 Jan 2014 11:43 AM
Didnt work, output says:
attempt to call a nil value
Disconnected event because of exception
Report Abuse
kingmatt2 is not online. kingmatt2
Joined: 20 Aug 2011
Total Posts: 6494
01 Jan 2014 11:45 AM
function onClicked()
script.Parent.Parent.TextLabel.TextLabel2:Destroy()
script.Parent:Destroy()
end
script.Parent.MouseButton1Click:connect(OnClicked)


That has more chance of succeeding.
Report Abuse
Roboguy51 is not online. Roboguy51
Joined: 26 Feb 2011
Total Posts: 35
01 Jan 2014 11:48 AM
Still not working :/
Report Abuse
kingmatt2 is not online. kingmatt2
Joined: 20 Aug 2011
Total Posts: 6494
01 Jan 2014 12:08 PM
Gives us everything in the enire output. Copy and paste.
Report Abuse
Roboguy51 is not online. Roboguy51
Joined: 26 Feb 2011
Total Posts: 35
01 Jan 2014 12:18 PM
Got it to work now, on the last line when i put (OnClicked) it wasnt supposed to be a capital "O" :|
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