I was wondering which is the best way to make a frame's position change with the mouse's X and Y axis.
I have done it before using RenderStepped, I'm not sure whether it is the ideal method of doing so in 2018...??
(I'm asking for opinions)
The Move event of PlayerMouse (Mouse.Move
) is the best for this situation.
local Mouse = game.Players.LocalPlayer:GetMouse() Mouse.Move:Connect(function() local X = Mouse.X local Y = Mouse.Y Frame.Position = UDim2.new(0,X,0,Y) end)