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: SurfaceGui troubles

Previous Thread :: Next Thread 
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
09 Mar 2014 06:21 PM
Alright so I have put a surfacegui in startergui/playergui
and have set the brick to adorn to. However, it is not reacting to
any mouse events at all.

I've used events such as this:

script.Parent.MouseButton1Down:connect(function()
print("regular script works")
end)

I followed what the wiki has instructed:
"Note: SurfaceGuis must be descendants of PlayerGui in order to know the player who is interacting with it."

What am I doing wrong?
Report Abuse
mycheeze is not online. mycheeze
Joined: 27 Jun 2011
Total Posts: 6748
09 Mar 2014 06:25 PM
What you're doing wrong is you forgot that scripting is, oh ho ho it's magik, like-

Also while you're at it, go to youtube and search mr.bean magic snort snort.
It will cheer you up in this time of stressing testing.
Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
09 Mar 2014 06:28 PM
Thanks for the help.
Report Abuse
mycheeze is not online. mycheeze
Joined: 27 Jun 2011
Total Posts: 6748
09 Mar 2014 06:30 PM
Oh, and umm if you have the player limit set to 1, you could do this.

Person = game.Players:GetChildren()
if #Person == 1 then
Player = Person[1]end

So now you can have a surface gui be a child of a part rather than a StarterGui
and when you want to interact with a player you can just type

Player.Character.Head.Transparency = 1 -- For example
Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
09 Mar 2014 06:32 PM
I'm sure that would work with a server with over 30 people.
Report Abuse
mycheeze is not online. mycheeze
Joined: 27 Jun 2011
Total Posts: 6748
09 Mar 2014 06:33 PM
o, o-k
Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
09 Mar 2014 07:04 PM
bump
Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
10 Mar 2014 04:29 AM
b2
Report Abuse
Bebee2 is not online. Bebee2
Joined: 17 May 2009
Total Posts: 3985
10 Mar 2014 04:38 AM
Place the SurfaceGui inside StarterGui and replace the server script with a localscript

That's one option that I am 100% sure of.
Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
10 Mar 2014 04:47 AM
I tried that earlier.
Also does the brick being part of a model affect it at all?
Report Abuse
Bebee2 is not online. Bebee2
Joined: 17 May 2009
Total Posts: 3985
10 Mar 2014 04:49 AM
No, but the button has to be over the part to fire.
Also, used a LocalScript.
If there OTHER surface guis on the SAME part, neither events will fire I think.
Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
10 Mar 2014 04:51 AM
Actually being part of the model did effect it.
Just tested it outside of the model.
I'm thinking of a solution right now, thanks for the help.
Report Abuse
Bebee2 is not online. Bebee2
Joined: 17 May 2009
Total Posts: 3985
10 Mar 2014 04:52 AM
+1 Thing to spread around
Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
10 Mar 2014 04:55 AM
Nevermind that statement, I found that a brick mesh was blocking the actual
surface. -___-
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