|
| 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 |
|
|
|
| 06 Jun 2015 12:36 AM |
Remote functions
It's delightful, It's delicious, It's delovely! |
|
|
| Report Abuse |
|
|
Vritix
|
  |
| Joined: 01 Jan 2011 |
| Total Posts: 2790 |
|
| |
|
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 |
|
|
|
| 06 Jun 2015 12:40 AM |
| You have to actually index the actual GUI and part, that was just an example. |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 06 Jun 2015 12:44 AM |
| And what doesn't work about it? |
|
|
| Report Abuse |
|
|
Vritix
|
  |
| Joined: 01 Jan 2011 |
| Total Posts: 2790 |
|
| |
|
| |
|
Vritix
|
  |
| Joined: 01 Jan 2011 |
| Total Posts: 2790 |
|
| |
|
| |
|
Vritix
|
  |
| Joined: 01 Jan 2011 |
| Total Posts: 2790 |
|
| |
|
ShungTzu
|
  |
| Joined: 14 Jun 2014 |
| Total Posts: 959 |
|
| |
|
Vritix
|
  |
| Joined: 01 Jan 2011 |
| Total Posts: 2790 |
|
|
| 06 Jun 2015 01:00 AM |
Screen is the brick inside model1.
|
|
|
| Report Abuse |
|
|
|
| 06 Jun 2015 01:06 AM |
| What makes you so sure the adornee is not set? |
|
|
| Report Abuse |
|
|
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
|
  |
| 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
|
  |
| 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
|
  |
| 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 |
|
|
|
| 06 Jun 2015 07:22 PM |
localPlayer = script; repeat localPlayer = localPlayer.Parent until localPlayer:IsA('Player'); |
|
|
| Report Abuse |
|
|