Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to use Adornee on SurfaceGui?

I was wondering how to set the Adornee with SurfaceGui? I don't find any tutorial.

1 answer

✓ Accepted answer

Click the SurfaceGui object in your explorer, and on the left side you should see Adornee under the property list. Click it, then select whichever part you want to adorn to.

If you want to change it in a script, you have to reference the SurfaceGui object then set the Adornee property to the part you specify.

For example:

-- this script is located inside the SurfaceGui
local surfaceGui = script.Parent
local partToAdornTo = workspace:WaitForChild("AdorningPart")

surfaceGui.Adornee = partToAdornTo

Simple as that.

Hope this helps :)

5 comments

0

May I put the SurfaceGui in the StarterGui?

0

SurfaceGui's are used in parts in Workspace, if you want to just make a 2D GUI on your screen at all times you should use ScreenGui instead.

0

But I want use LocalScript with this SurfaceGui, so how?

0

If you want to make clickable SurfaceGui's then it must be in StarterGui, adorned to the part you want it to be on.

0

Yes. You can put the SurfaceGui in StarterGui.

This discussion is preserved as it was. New answers, comments, and votes are closed.