I'm trying to make a gun, and I've decided making fake arms is the best way to animate it. I've created the fake arms, but whenever I try to angle them, it sets the rotation to what I would think it's supposed to set it to, but it then teleports it around my character. Does anyone know why this is happening and wouldn't care to explain?
Here's my script for making the fake arms (yes, this is a localscript)
local player = game:GetService("Players").LocalPlayer local character = player.CharacterAdded:wait() local rightArm,leftArm = character:WaitForChild("Right Arm"),character:WaitForChild("Left Arm") local rightWeld,leftWeld = Instance.new("Weld",character:WaitForChild("Torso")),Instance.new("Weld",character:WaitForChild("Torso")) local fakeArms = Instance.new("Model",character) local fakeRightArm,fakeLeftArm = Instance.new("Part",fakeArms),Instance.new("Part",fakeArms) fakeArms.Name = "fakeArms" rightWeld.Name = "rightWeld" fakeRightArm.Size = rightArm.Size fakeRightArm.CFrame = rightArm.CFrame fakeRightArm.CanCollide = false rightWeld.C0 = character:WaitForChild("Torso").CFrame:inverse() rightWeld.Part0 = character:WaitForChild("Torso") rightWeld.C1 = fakeRightArm.CFrame:inverse() rightWeld.Part1 = fakeRightArm leftWeld.Name = "leftWeld" fakeLeftArm.Size = leftArm.Size fakeLeftArm.CFrame = leftArm.CFrame fakeLeftArm.CanCollide = false leftWeld.C0 = character:WaitForChild("Torso").CFrame:inverse() leftWeld.Part0 = character:WaitForChild("Torso") leftWeld.C1 = fakeLeftArm.CFrame:inverse() leftWeld.Part1 = fakeLeftArm
Here's the script that I've tried to angle the arms
workspace.Player1.Torso.leftWeld.C0 = workspace.Player1.Torso.leftWeld.C0 * CFrame.Angles(1,0,0)
Thanks to anyone that can help :)!