Code:
workspace.ChildAdded:Connect(function(obj) wait(1) if obj:FindFirstChild("Humanoid") then local gun = script.gun:Clone("Gun") gun.Parent = obj local weld = Instance.new("Weld") weld.Parent = gun weld.Part0 = gun weld.Part1 = obj:WaitForChild("Torso") weld.C0 = obj.Torso.CFrame + Vector3.new(0.6,0.4,0.6) weld.C1 = obj.Torso.CFrame gun.CFrame = gun.CFrame * CFrame.Angles(math.pi / 2, 0, 0) end end)
Result: https://gyazo.com/bf7a240ac09dc69d0242af05f9b12462
Am I missing something obvious?
I'm new to CFrames. I just want the gun to be rotated so its facing down.
You could change the C0 or C1 properties of the weld to rotate and move the gun.
It might seem complicated but as far as i know it is one of the easiest methods there is.