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: Replacement for MouseButton1Click on SurfaceGui?

Previous Thread :: Next Thread 
Dr_Doge is not online. Dr_Doge
Joined: 07 Dec 2011
Total Posts: 645
07 May 2016 04:29 PM
Im making a Surface Gui Music player, but I noticed that MouseButton1Click seems to only work in Player guis and not SurfaceGuis.

Anyone have any fixes for this?
(I know I could have Bricks for buttons instead but that's not really practical)
Report Abuse
Dr_Doge is not online. Dr_Doge
Joined: 07 Dec 2011
Total Posts: 645
07 May 2016 04:43 PM
[ Content Deleted ]
Report Abuse
SenseiWarrior is online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
07 May 2016 04:46 PM
mousebutton1down


Report Abuse
Dr_Doge is not online. Dr_Doge
Joined: 07 Dec 2011
Total Posts: 645
07 May 2016 04:56 PM
^ That doesn't seem to be working either.
Report Abuse
Dev_Ryan is online. Dev_Ryan
Joined: 10 Mar 2013
Total Posts: 243
07 May 2016 04:59 PM
MouseButton1Click/Down/Up is for localscripts to get the mouse of the player's client. It wont work in a server script. Also you might have to use ClickDetector object instead, and if you are using Filtering Enabled then you will need to make the clickDetector send info from the server to the client using RemoteEvent or RemoteFunction.


Report Abuse
Dr_Doge is not online. Dr_Doge
Joined: 07 Dec 2011
Total Posts: 645
07 May 2016 05:04 PM
@Dev_Ryan
Hold your horses.
The script is local and I've seen plenty of people do this before.
I know its possible, but how?
Report Abuse
Dr_Doge is not online. Dr_Doge
Joined: 07 Dec 2011
Total Posts: 645
07 May 2016 06:29 PM
This is not a bump.
Report Abuse
Dr_Doge is not online. Dr_Doge
Joined: 07 Dec 2011
Total Posts: 645
10 May 2016 04:47 PM
Halp plox.


Report Abuse
lululukas is not online. lululukas
Joined: 23 Aug 2010
Total Posts: 1043
10 May 2016 04:50 PM
have mouse.Target be the block which the surfacegui is on, then use that event on the brick itself. You can't click the gui, you can only click the part
Report Abuse
Dr_Doge is not online. Dr_Doge
Joined: 07 Dec 2011
Total Posts: 645
10 May 2016 04:55 PM
aww ok. That sucks but ok.


Report Abuse
eRanged is not online. eRanged
Joined: 15 Jun 2013
Total Posts: 9746
10 May 2016 05:03 PM
If it's local MouseButton1Click should work fine...
I used this from my surfaceGui

Button.MouseButton1Click:connect(function()

end)


Report Abuse
lululukas is not online. lululukas
Joined: 23 Aug 2010
Total Posts: 1043
10 May 2016 05:04 PM
Doesn't really suck you can just say

script.Parent.SurfaceGui and do whatever you want with it.
Report Abuse
Dr_Doge is not online. Dr_Doge
Joined: 07 Dec 2011
Total Posts: 645
10 May 2016 05:23 PM
LOL RIP.
The only reason the Buttons didnt work was because the whole thing was in my character.


Report Abuse
RecurringNightmare is not online. RecurringNightmare
Joined: 05 Jul 2012
Total Posts: 15336
10 May 2016 05:24 PM
SurfaceGui Adornee needs to be set from startergui/playergui for any events to fire for textbuttons n stuff


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