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

Can some one help explain CFrame better in this instance?

Asked by
Voltoxus 248 Moderation Voter
9 years ago
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.

0
If you want to find where the mouse is, do mouse.Hit.p EzraNehemiah_TF2 3552 — 9y
0
Ik that Voltoxus 248 — 9y

Answer this question