|
| 24 Jan 2016 03:25 PM |
I want to set the adornee for a surfacegui that contains a button to a part named, "keyhole". Any help?
Thanks in advance. |
|
|
| Report Abuse |
|
|
| |
|
Aethex
|
  |
| Joined: 16 Oct 2011 |
| Total Posts: 2193 |
|
|
| 24 Jan 2016 03:26 PM |
| SurfaceGui.Adornee = workspace.keyhole -- assuming "SurfaceGui" is defined, assuming "keyhole" is a direct descendant of workspace |
|
|
| Report Abuse |
|
|
|
| 24 Jan 2016 03:27 PM |
| Do I parent the script to the surfacegui or the button? |
|
|
| Report Abuse |
|
|
Aethex
|
  |
| Joined: 16 Oct 2011 |
| Total Posts: 2193 |
|
|
| 24 Jan 2016 03:27 PM |
| What? The button should be in the SurfaceGui. It doesn't matter where you put it. It should be a localscript, though. |
|
|
| Report Abuse |
|
|
cgjnm
|
  |
| Joined: 22 Dec 2011 |
| Total Posts: 2347 |
|
|
| 24 Jan 2016 03:28 PM |
| Does not matter about the hierarchy of the script as long as you define the variables |
|
|
| Report Abuse |
|
|
Klink45
|
  |
| Joined: 06 Jun 2011 |
| Total Posts: 26054 |
|
|
| 24 Jan 2016 03:29 PM |
I prefer to do the command bar. Just type this into it
local partname = "Your part's name here."
local generating = "BillboardGui" --Change this to what item you wanna set the adornee to is.
local id = Instance.new(generating, game.Workspace:FindFirstChild(partname)) --Got no clue if that works :(
id.Adornee = game.Workspace:FindFirstChild(partname)
u sicko! http://www.roblox.com/u-sicko-item?id=328185093 |
|
|
| Report Abuse |
|
|
| |
|