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
 

Efficient Way

Previous Thread :: Next Thread 
nQqzRYVpIKA5jLP is not online. nQqzRYVpIKA5jLP
Joined: 05 Mar 2015
Total Posts: 4135
06 Jun 2015 12:33 AM
It isn't "locked". It just can't be set in the properties window because of Roblox's crappy studio UI. Just set it via a script like so:

ScreenGui.Adornee = workspace.PartName
Report Abuse
RegularTetragon is not online. RegularTetragon
Joined: 10 Oct 2009
Total Posts: 3085
06 Jun 2015 12:36 AM
Remote functions



It's delightful, It's delicious, It's delovely!
Report Abuse
Vritix is not online. Vritix
Joined: 01 Jan 2011
Total Posts: 2790
06 Jun 2015 12:39 AM
@nQ

didn't work.
Report Abuse
ShungTzu is not online. ShungTzu
Joined: 14 Jun 2014
Total Posts: 959
06 Jun 2015 12:39 AM
brick.Touched:connect(function(ThePlayerWhoTouchedIsPassedInThisValueRightHere)
ThePlayerWhoTouchedIsPassedInThisValueRightHere.Character.Head:Destroy()
end)
Report Abuse
nQqzRYVpIKA5jLP is not online. nQqzRYVpIKA5jLP
Joined: 05 Mar 2015
Total Posts: 4135
06 Jun 2015 12:40 AM
You have to actually index the actual GUI and part, that was just an example.
Report Abuse
Vritix is not online. Vritix
Joined: 01 Jan 2011
Total Posts: 2790
06 Jun 2015 12:41 AM
I know that was an example...

I made this :

function insert()
local model1 = game.Workspace.Model1

script.Parent.Adornee = model1.Screen
end
insert()
Report Abuse
nQqzRYVpIKA5jLP is not online. nQqzRYVpIKA5jLP
Joined: 05 Mar 2015
Total Posts: 4135
06 Jun 2015 12:44 AM
And what doesn't work about it?
Report Abuse
Vritix is not online. Vritix
Joined: 01 Jan 2011
Total Posts: 2790
06 Jun 2015 12:45 AM
Doesn't set the Adornee.
Report Abuse
nQqzRYVpIKA5jLP is not online. nQqzRYVpIKA5jLP
Joined: 05 Mar 2015
Total Posts: 4135
06 Jun 2015 12:45 AM
Is this in a localscript?
Report Abuse
Vritix is not online. Vritix
Joined: 01 Jan 2011
Total Posts: 2790
06 Jun 2015 12:46 AM
no
Report Abuse
nQqzRYVpIKA5jLP is not online. nQqzRYVpIKA5jLP
Joined: 05 Mar 2015
Total Posts: 4135
06 Jun 2015 12:47 AM
What is the output?
Report Abuse
Vritix is not online. Vritix
Joined: 01 Jan 2011
Total Posts: 2790
06 Jun 2015 12:49 AM
nothing
Report Abuse
ShungTzu is not online. ShungTzu
Joined: 14 Jun 2014
Total Posts: 959
06 Jun 2015 12:57 AM
What is model1.Screen ?
Report Abuse
Vritix is not online. Vritix
Joined: 01 Jan 2011
Total Posts: 2790
06 Jun 2015 01:00 AM
Screen is the brick inside model1.
Report Abuse
nQqzRYVpIKA5jLP is not online. nQqzRYVpIKA5jLP
Joined: 05 Mar 2015
Total Posts: 4135
06 Jun 2015 01:06 AM
What makes you so sure the adornee is not set?
Report Abuse
ShungTzu is not online. ShungTzu
Joined: 14 Jun 2014
Total Posts: 959
06 Jun 2015 02:11 AM
Shoot, I'm sorry, I just realized that I posted a wrong answer before.

The most efficient way to get it on Touched is game.Players:GetPlayerFromCharacter(CharacterPassedHere).

On a SurfaceGui, the answer is that the scrip really does NOT have to be in the part, you can refer to it from anywhere.

From a LocalScript, you would do game.Workspace.brick.SurfaceGui.Frame.TextButton.MouseButton1Click:connect(function() dosomething end)...


A ClickDetector inside the part DOES pass the player who clicked.
Report Abuse
Vritix is not online. Vritix
Joined: 01 Jan 2011
Total Posts: 2790
06 Jun 2015 01:49 PM
@nQ

Because it doesn't go on to the brick "Screen"?
Report Abuse
ShungTzu is not online. ShungTzu
Joined: 14 Jun 2014
Total Posts: 959
06 Jun 2015 07:11 PM
What does the Adornee value of the Gui say?
Report Abuse
ShungTzu is not online. ShungTzu
Joined: 14 Jun 2014
Total Posts: 959
06 Jun 2015 07:18 PM
I just don't see why anyone would ever put a SurfaceGui in PlayerGui.

Just put it in the brick, and refer to it from a LocalScript in PlayerGui.

That's gonna be the easiest way to do it. You won't even have to worry about which player is which, they'll all be game.Player.LocalPlayer.
Report Abuse
KOTwarrior is not online. KOTwarrior
Joined: 13 Jun 2012
Total Posts: 4376
06 Jun 2015 07:22 PM
localPlayer = script;
repeat localPlayer = localPlayer.Parent
until localPlayer:IsA('Player');
Report Abuse
Previous Thread :: Next Thread 
Page 2 of 2Go to page: 1, [2] Prev
 
 
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