Howdy. I am welding a gun to my character's right hand. It cannot be a tool for many reasons, first and foremost that it needs to rotate to face my mouse (think Metroid Prime). This is the code inside my gun:
wait(2)
playerTable = game.Players:GetChildren()
player = playerTable[1]
print(player)
mouse = player:GetMouse()
weld = Instance.new("Weld")
weld.Parent = script.Parent
weld.Part0 = weld.Parent
weld.Part1 = player.Character["Right Arm"]
weld.C0 = CFrame.new(0,1,0)
while true do
wait()
script.Parent.CFrame = CFrame.new(script.Parent.CFrame.p, mouse.Hit.p)
end
As you would expect, this code welds the gun to the player's right arm one stud up. The problem comes with the CFrame's second vector. It works perfectly, sort of: the gun does rotate towards the mouse. The problem? It is welded to my character, so my character faces my mouse as well. Any help is appreciated. Thanks in advance.

2 comments
That sounds promising. I'll look into that
That worked phenomenally! Thank you!