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

Attempting to have an GUI move to a position in workspace, GUI disappears?

Asked by 4 years ago
Edited 4 years ago
-- locals
local player = game.Players.LocalPlayer
local frame = script.Parent:WaitForChild("Frame")
local part = workspace:WaitForChild("Part")
local partp = part.Position

-- script
while wait() do
    frame.Position = UDim2.new(0, partp.X, 0, partp.Y)
end

I put the frame anchor to 1,1. Because I thought it would fix the issue of having the GUI be stuck at 0,0. Though, it did more harm than friendliness. Can someone help or explain me why this doesn't work?

Thanks in advance,

0
Is frame a billboardGui or is it a screenGui? kingblaze_1000 359 — 4y
0
the frame is within a ScreenGUI, located in StarterGui IvanJupiter 36 — 4y
0
Hello whats is partp is it a part or a frame? JesseSong 3916 — 4y
0
partp is the part in workspace IvanJupiter 36 — 4y

1 answer

Log in to vote
0
Answered by
o_fex 146
4 years ago

You don't need a script for this. Instead make a part in the workspace, add a Billboard Gui **to it, and then put your **frame inside.

Set the size of the billboard to the same size as the frame so everything fits perfectly and then set the "AlwaysOnTop" bool value in the billboard **to "true**"

0
I intended to use an frame that will appear on the part, when you put on an tool IvanJupiter 36 — 4y
Ad

Answer this question