How would I get the exact location of a UI element in workspace

The title might sound confusing but I want to get where a UI element is located, Such as Game.StarterGui.Frame, etc. Here is the script I have so far and I want to get this info from what is selected. This is a plugin by the way!

local function PositionChange()
	for _, object in pairs(Selection:Get()) do --loop through all selected things in the workspace
		if object:IsA("GuiObject") then --check if that selected thing is a gui object
			print(object.Name.." Is A Gui Object") --print name
			object:GetPropertyChangedSignal("Position"):Connect(function()
				print(object.Position)

			end)
		else
			print(object.Name.." Is Not A Gui Object")
		end
	end
end

You just do instance:GetFullName().

1 Like

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