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: MouseButton1Click - Has something changed?

Previous Thread :: Next Thread 
ShiningLuck is not online. ShiningLuck
Joined: 05 Jun 2008
Total Posts: 468
02 Sep 2016 01:57 PM
for whatever reason, I cant get my Gui TextButtons to function anymore.
Has the connect command changed?

-----script example-----

function Click1()
print("Clicked")
end

script.Parent.Option1.MouseButton1Click:connect(Click1)
-------------------------
Report Abuse
real_words is not online. real_words
Joined: 25 Feb 2016
Total Posts: 2184
02 Sep 2016 01:59 PM
script.Parent.Option1.MouseButton1Down:connect(function()
print("Clicked")
end)


Report Abuse
iYzarky is not online. iYzarky
Joined: 01 Jun 2009
Total Posts: 1271
02 Sep 2016 02:00 PM
whatever.MouseButton1Down:connect(function()
--stuff here
end)




I don't even care hummie
Report Abuse
real_words is not online. real_words
Joined: 25 Feb 2016
Total Posts: 2184
02 Sep 2016 02:01 PM
Also, don't use MouseButton1Click, use MouseButton1Down.


Report Abuse
ShiningLuck is not online. ShiningLuck
Joined: 05 Jun 2008
Total Posts: 468
02 Sep 2016 02:01 PM
That didn't work for me earlier either. Before you ask, Yes I have made sure that everything is accurate. That's why I'm asking, Did something change?
Report Abuse
ShiningLuck is not online. ShiningLuck
Joined: 05 Jun 2008
Total Posts: 468
02 Sep 2016 02:02 PM
excellent. so it did change. it's now MouseClick1Down. Thank you both. ^_^
Report Abuse
real_words is not online. real_words
Joined: 25 Feb 2016
Total Posts: 2184
02 Sep 2016 02:03 PM
You're welcome.


Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
02 Sep 2016 02:03 PM
'don't use MouseButton1Click, use MouseButton1Down.'

Wrong. You can use both. It just depends on if you want the function to run after the first mouse press, or after a full click.


Report Abuse
tackykiller10000 is not online. tackykiller10000
Joined: 31 May 2010
Total Posts: 175
02 Sep 2016 02:04 PM
it didn't change for me... this still works.

function onClick()
script.Parent.Visible = false
script.Parent.Parent.Parent.Cargo.Visible = true
script.Parent.Parent.CargoHoldClose.Visible = true
end

script.Parent.MouseButton1Click:connect(onClick)
Report Abuse
real_words is not online. real_words
Joined: 25 Feb 2016
Total Posts: 2184
02 Sep 2016 02:06 PM
"Wrong. You can use both. It just depends on if you want the function to run after the first mouse press, or after a full click."
I was just suggesting.


Report Abuse
ShiningLuck is not online. ShiningLuck
Joined: 05 Jun 2008
Total Posts: 468
02 Sep 2016 02:06 PM
Still not working frustratingly enough...
-------
script.Parent.Option1.MouseButton1Down:connect(function()
print("Clicked")
end)
--------
Report Abuse
real_words is not online. real_words
Joined: 25 Feb 2016
Total Posts: 2184
02 Sep 2016 02:07 PM
Check output for me?


Report Abuse
ShiningLuck is not online. ShiningLuck
Joined: 05 Jun 2008
Total Posts: 468
02 Sep 2016 02:08 PM
must be a system error.

I'm going to triple check the Ancestry.
Thank you for all your comments.
Report Abuse
ShiningLuck is not online. ShiningLuck
Joined: 05 Jun 2008
Total Posts: 468
02 Sep 2016 02:09 PM
nothing shows up wrong on output.
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
02 Sep 2016 02:09 PM
Make sure the gui is an ImageButton or TextButton and make sure you are using a local script

--local script

local gui = script.Parent
local option = gui:WaitForChild('Option1')

option.MouseButton1Click:connect(function()
print('Clicked')
end)


Report Abuse
real_words is not online. real_words
Joined: 25 Feb 2016
Total Posts: 2184
02 Sep 2016 02:09 PM
The scripts enabled, right?


Report Abuse
ShiningLuck is not online. ShiningLuck
Joined: 05 Jun 2008
Total Posts: 468
02 Sep 2016 02:14 PM
Whoops, thanks TimeTicks, That would be it.
I wasn't using a local script.

Its working wonderfully now.

Thanks abunch to you both for sticken with me.
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