Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I get a CFrame value from a GUI's position?

Asked by 5 years ago

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)
0
Use script.parent.position rgw22 0 — 5y

Answer this question