Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

-- 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,

4 comments

0

Is frame a billboardGui or is it a screenGui?

0

the frame is within a ScreenGUI, located in StarterGui

0

Hello whats is partp is it a part or a frame?

0

partp is the part in workspace

1 answer

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"

1 comment

0

I intended to use an frame that will appear on the part, when you put on an tool

This discussion is preserved as it was. New answers, comments, and votes are closed.