#How to put frame position relative to mouse position
1 messages · Page 1 of 1 (latest)
is the anchorpoint at (0, 0)
no. the anchor point was a .5 .5 but even at (0,0) the y of the frame is too far
I can only assume that you declared the position pre-emptively. So once you move your mouse and click the button (or whatever), that the position is already off
You can very easily make a frame fellow your mouse by just doing something like this.
local UIS = game:GetService("UserInputService")
local f = script.Parent.Frame
UIS.InputChanged:Connect(function(inp)
if inp.UserInputType == Enum.UserInputType.MouseMovement then
f.Position = UDim2.fromOffset(inp.Position.X, inp.Position.Y)
end
end)
just change that as you see fit
well i dont need it to follow my mouse but just to teleportwhere my mouse was previously