I am trying to get the GUI's position in the workspace, like mouse.Hit but with a text button instead of a mouse.

local gui = script.Parent

function getCFrame()
    return ?????
end)

gui.MouseButton1Click:connect(function()
    local cf = getCFrame()
    if cf then Instance.new("Part", workspace).CFrame = cf end
end)

1 comment

0

Use script.parent.position