Just wanted to know if anyone prefers to use Mouse.Move since it only updates the frames position when the mouse moves, which I prefer this as it wont affect performance. Where renderstepped updates every frame. What are your thoughts? Is it recommended to use renderstepped for some circumstances? Or Move function would lag if the mouse moved mad (real fast)?
local mouse = game.Players.LocalPlayer:GetMouse()
local Frame = script.Parent.Frame
mouse.Move:Connect(function()
Frame.Position = UDim2.new(0, mouse.x, 0, mouse.Y)
print(Frame.Position)
end)
or
local mouse = game.Players.LocalPlayer:GetMouse()
local Frame = script.Parent.Frame
game:GetService("RunService").RenderStepped:Connect(function()
Frame.Position = UDim2.new(0, mouse.x, 0, mouse.Y)
print(Frame.Position)
end)

1 comment
renderstepped is smoother but honestly your choice, renderstepped is just like usually 60 times a second so basically a wait(0.16)