i want a part to rotate to cursor via Orientation; no CFrame witchcraft. can anybody help me with this?
Eh, you need some CFrame witchcraft. But it's fairly simple to do!
One of the constructors of a CFrame is as follows:
CFrame.new ( Vector3 Position, Vector3 LookAt )
For example:
CFrame.new(Vector3.new(0, 10, 0), Vector3.new(5, 0, 0))
Will create a CFrame located at {0, 10, 0}
, oriented towards {5, 0, 0}
. And that's all! Now all that's left is to plug in what you know already:
-- Local script local mouse = game.Players.LocalPlayer:GetMouse() local part = workspace.Part mouse.Move:Connect(function() part.CFrame = CFrame.new(part.Position,mouse.Hit.Position) end)
Hope I helped!