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: Can this work in a surfacegui?

Previous Thread :: Next Thread 
seliso is not online. seliso
Joined: 30 Jan 2011
Total Posts: 6443
31 Jan 2015 08:14 PM
local sp = script.Parent

local button_100 = sp:findFirstChild("100")

button_100.MouseButton1Down:connect(function()
print("100")
end)

I have this in a localscript in the surface gui.
Report Abuse
SaluteMeScrub is not online. SaluteMeScrub
Joined: 28 Dec 2013
Total Posts: 380
31 Jan 2015 08:17 PM
Surface GUI's work the same way Screen GUI's work. So if it worked in a screen GUI, it would work in a surface GUI.
Report Abuse
Rocky28447 is not online. Rocky28447
Joined: 11 Dec 2009
Total Posts: 2912
31 Jan 2015 08:20 PM
Unless it uses LocalPlayer.
Report Abuse
SaluteMeScrub is not online. SaluteMeScrub
Joined: 28 Dec 2013
Total Posts: 380
31 Jan 2015 08:22 PM
Ahh, true enough, this is a way to bypass this, just use the mouse function, and get the player who clicked it.
Report Abuse
seliso is not online. seliso
Joined: 30 Jan 2011
Total Posts: 6443
31 Jan 2015 08:23 PM
This script works in a screengui but it doesn't work in the surface gui I also have filtering enabled enabled.
Report Abuse
seliso is not online. seliso
Joined: 30 Jan 2011
Total Posts: 6443
31 Jan 2015 08:25 PM
@SaluteMeScrub

can you give me a example?
Report Abuse
SaluteMeScrub is not online. SaluteMeScrub
Joined: 28 Dec 2013
Total Posts: 380
31 Jan 2015 08:33 PM
Sure! Give me a few minutes.
Report Abuse
seliso is not online. seliso
Joined: 30 Jan 2011
Total Posts: 6443
31 Jan 2015 08:35 PM
Okay! thanks :D
Report Abuse
SaluteMeScrub is not online. SaluteMeScrub
Joined: 28 Dec 2013
Total Posts: 380
31 Jan 2015 09:03 PM
local part = workspace.Part
local button = script.Parent.Frame.TextButton
script.Parent.Adornee = part
button.MouseButton1Down:connect(function()
button.Text = "Hi?"
end)

Sorry it took awhile, had to do something.
Report Abuse
SaluteMeScrub is not online. SaluteMeScrub
Joined: 28 Dec 2013
Total Posts: 380
31 Jan 2015 09:06 PM
You have to put SurfaceGUI inside StarterGUI, and put the script inside SurfaceGUI.
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