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?
local player = game.Players.LocalPlayer local mouse = player:GetMouse() while wait() do script.Parent.Position = UDim2.new(mouse.X,0,mouse.Y,0) end