I want to make a popup from screen gui in my game that moves along with the mouse like a window on your computer. It's not just simply UDim2.new(0,mouse.X, 0,mouse.Y), because that sets the position based on the AnchorPoint. I know it's possible because you can do it with the developer console. Does anyone know how to do it specifically?
COMMUNITY QUESTION
how to make screen gui follow your mouse?
1 answer
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
while wait() do
script.Parent.Position = UDim2.new(mouse.X,0,mouse.Y,0)
end
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
replace the wait() with true
with what? a event connected function?
the textbutton just disappears...
can you...