Recently I have been working on a Zombie Tower game, but I have had a problem with the gun. In the script, it makes first person arms follow the camera, but only the right arm works. Here is the script.
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
game["Run Service"].RenderStepped:Connect(function()
local rightX, rightY, rightZ = player.Character.Torso["Right Shoulder"].C0:ToEulerAnglesYXZ()
player.Character.Torso["Right Shoulder"].C0 = (player.Character.Torso["Right Shoulder"].C0 * CFrame.Angles(0, 0, -rightZ)) * CFrame.Angles(0, 0, math.asin((mouse.Hit.p - mouse.Origin.p).unit.y))
local leftX, leftY, leftZ = player.Character.Torso["Left Shoulder"].C0:ToEulerAnglesYXZ()
player.Character.Torso["Left Shoulder"].C0 = (player.Character.Torso["Left Shoulder"].C0 * CFrame.Angles(0, 0, -leftZ)) * CFrame.Angles(0, 0, math.asin((mouse.Hit.p - mouse.Origin.p).unit.y))
end)
Here is what happens:
Any help is appreciated.