CoreFunctions.RotateToMouse = function(obj,pos) local CoreWeld = obj.GunModel.MountPoint.CoreWeld local CoreObj = obj.GunModel.MountPoint if CoreWeld ~= nil and CoreObj ~= nil then CoreWeld.C1 = CFrame.new(CoreObj.Position, pos) end end
obj is a folder class that contains the weapon information pos is the mouse.hit converted to vector3
Can some one fix or explain how to make the model rotate to the mouse position what I tried isn't working, basically a first person gun that tracks mouse.