Hey!
I know this has been asked before but the method is either outdated or I have some settings wrong. I just added a frame to a new gui, and added the following localscript:
local mouse = game.Players.LocalPlayer:GetMouse();
while wait() do
script.Parent.Parent.Position = UDim2.new(0, mouse.X, 0, mouse.Y);
end
The frame DOES follow the mouse, but very weirdly. It gets offset a little and moves left/right and up/down more and more when you get near the edge of you screen. I want it to always stay on a static point relative to the mouse.
I've seen this done in a few games, so I know it's possible. How can I achieve this?

2 comments
I didn't mean it was jittery, it just moves weirdly offset of the mouse, slightly up/down or left/right depending on the position of the cursor and stays there. I don't mean that it lags behind or something.
Thanks for the tip though, changed it and now it's more smooth :)