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: Gui TextButton question

Previous Thread :: Next Thread 
TomsGames is online. TomsGames
Joined: 11 Oct 2013
Total Posts: 1615
16 Feb 2014 09:16 AM
If I am trying to make a function run when the textbutton is clicked is this right:

StarterGui > ScreenGui > TextButton > Local script

In the localscript I have

button = script.Parent

function DOSTUFF()
--stuff
end

button.MouseButton1Down:connect(DOSTUFF)
Report Abuse
magicalandre13 is not online. magicalandre13
Joined: 21 Jan 2011
Total Posts: 5327
16 Feb 2014 09:36 AM
just put it in a normal script
Report Abuse
TomsGames is online. TomsGames
Joined: 11 Oct 2013
Total Posts: 1615
16 Feb 2014 09:36 AM
Normal script? Why? It's only designed to run for the player with the gui, which is local!
Report Abuse
magicalandre13 is not online. magicalandre13
Joined: 21 Jan 2011
Total Posts: 5327
16 Feb 2014 09:37 AM
it'll still work.
Report Abuse
TomsGames is online. TomsGames
Joined: 11 Oct 2013
Total Posts: 1615
16 Feb 2014 09:41 AM
Localscripts are quicker though since they're run on the client. Also it doesn't work in either script OR localscript, so I'm pretty sure the connecting function is wrong.
Report Abuse
duckwit is not online. duckwit
Joined: 08 Aug 2008
Total Posts: 1310
16 Feb 2014 09:52 AM
Is the TextButton Active? It's Active property must be set to true for mouse events to be fired.
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