I'm having a part follow the mouse. But when the player isn't facing a certain direction, mouse movements don't coordinate with where the part moves.
I tried using lookVectors as well but don't have a good understanding of using them.
local function Panned(input, processed) if not processed and input.UserInputType == Enum.UserInputType.MouseMovement then delta = input.Delta panDeltaMouse = -delta move_vector =focus.Position-Vector3.new(delta.X,0,delta.Y)*speed -- need help here end end
You can use the .Move
to detect mouse movement and set the part's position as Mouse.Hit.p (a vector3 position)
local Mouse = game.Players.LocalPlayer:GetMouse() local Part = workspace.Part Mouse.Move:connect(function() Part.Position = Mouse.Hit.p end)