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: Using TextLabels as buttons

Previous Thread :: Next Thread 
DoctorTempest is not online. DoctorTempest
Joined: 05 Jan 2013
Total Posts: 3838
11 Dec 2013 10:30 PM
function onClicked(mouse)
gui.StartGui.Menu.Visible = true
end


script.Parent.MouseButton1Click:connect(onClicked)


All variables defined.

What should I change the bottom line too if I want to use this script for a TextLabel?

I'm tempting you with my PhD.
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
11 Dec 2013 10:33 PM
WHY NOT JUST USE A TEXTBUTTON
Report Abuse
DoctorTempest is not online. DoctorTempest
Joined: 05 Jan 2013
Total Posts: 3838
11 Dec 2013 10:35 PM
because I can't be bothered pasting one in and changing all the settings when I already have a label

I'm tempting you with my PhD.
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
11 Dec 2013 10:43 PM
Heres a hax way then

local tbutton = Instance.new("TextButton", YOURTEXTLABELHERE)
tbutton.BackgroundTransparency = 1
tbutton.ZIndex = 10
tbutton.Size = UDim2.new(1,0,1,0)
tbutton.Text = ""
tbutton.MouseButton1Down:connect(function() whatever end)
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