I can't assign surface gui adornee to the part

I have a part and I have a surfacegui. I want to assign surfacegui’s adornee to the part in the script, but it doesn’t work.

local SurfaceGui = game.StarterGui.SurfaceGui
local Part = game.workspace.Part

SurfaceGui.Adornee = Part

This is the code im using right now and im probably doing something wrong. can you help?

works fine for me, but try this:

local player = game.Players.PlayerAdded:Wait()
local SurfaceGui = player.PlayerGui:WaitForChild("SurfaceGui")
local Part = game.workspace.Part

SurfaceGui.Adornee = Part

if that doesn’t work and doesn’t give you errors, you could try putting it somewhere else than startergui

1 Like

yeah its working well now thank you

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.