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
 

How to set adornees?

Previous Thread :: Next Thread 
Alimegacorn is not online. Alimegacorn
Joined: 24 May 2013
Total Posts: 899
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
championbuilder is not online. championbuilder
Joined: 20 Jan 2009
Total Posts: 13544
24 Jan 2016 03:26 PM
SurfaceGui.Adornee = Part
Report Abuse
Aethex is not online. 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
Alimegacorn is not online. Alimegacorn
Joined: 24 May 2013
Total Posts: 899
24 Jan 2016 03:27 PM
Do I parent the script to the surfacegui or the button?
Report Abuse
Aethex is not online. 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 is not online. 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 is not online. 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
Alimegacorn is not online. Alimegacorn
Joined: 24 May 2013
Total Posts: 899
24 Jan 2016 03:30 PM
K thanks!(To all of you.)
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