I’m trying to create a tool that follows by mouse, but the localscript will not get the part I need to rotate. I’ve tried to change the name of the part, and it still doesn’t work.
is the part I’m trying to rotate.
There is my code:
local mouse = game.Players.LocalPlayer:GetMouse() while true do script.Parent.Body.CFrame = CFrame.new(script.Parent.Body.CFrame.p, mouse.Hit.p) * CFrame.Angles(0,math.rad(20),0) script.Parent.Body.Position = script.Parent.Handle.Position script.Parent.Body.Orientation += Vector3.new(0, 45, 0) wait(0) end