Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Part moving towards camera instead of the mouse.hit.Position?

Asked by 3 years ago

For some reason when i do a while loop of the part.Position assigned to mouse.Hit.Position, the part moves towards the camera?

I've tried to raycast the mouse aswell, but the outcome is the same.

local Players = game:GetService("Players")
local player = Players.LocalPlayer

local mouse = player:GetMouse()


while wait() do

    workspace.Part.Position = mouse.Hit.Position    
end

Answer this question