As I am currently making and fps game.
I need the players arms to point towards the mouse.
BUT! It’s cancelling out the animation.
How do I do this?
local Camera = workspace.CurrentCamera
local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()
local char = Player.Character or Player.CharacterAdded:Wait()
local Root = char:WaitForChild("HumanoidRootPart")
local RunService = game:GetService("RunService")
local CN,CA = CFrame.new,CFrame.Angles
local an = math.asin
local armOffset = char.Torso.CFrame:Inverse() * char["Left Arm"].CFrame
local armWeld = Instance.new("Weld")
armWeld.Part0 = char.Torso
armWeld.Part1 = char["Left Arm"]
armWeld.Parent = char
RunService.Heartbeat:Connect(function()
local cframe = CN(char.Torso.Position, Mouse.Hit.Position) * CA(math.pi/2, 0, 0)
armWeld.C0 = armOffset * char.Torso.CFrame:toObjectSpace(cframe) * CN(0,0,-0.5)
end)