Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Help with angles?

Asked by 9 years ago

I was wondering how could I keep the same position of the players "Right Arm" with the weld and rotate it because when I do rotate the player's arm goes inside the torso.

Player = game.Players.LocalPlayer
Character = Player.Character
Torso = Character.Torso
Mouse = Player:GetMouse()
----------------------------------------
function CharacterCheck()
    if not Character or Character.Parent == nil then
    Character = Player.CharacterAdded:wait()
    end
end
CharacterCheck()
----------------------------------------
function MakeWelds()
    local Arms = {Character["Left Arm"],
                  Character["Right Arm"]
    }
    local ArmWelds = {}
    for i,v in pairs (Arms) do
        local Weld = Instance.new("Weld",Torso)
        Weld.Name = v.Name.." Weld"
        Weld.Part0 = Torso
        Weld.Part1 = v
        ArmWelds[i] = Weld
    end
    return ArmWelds
end
Welds = MakeWelds()
Welds[1].C0 = CFrame.new(1.5,0,0)
Welds[2].C0 = CFrame.new(-1.5,0,0)
Welds[1].C0 = CFrame.Angles(Welds.C0.CFrame*CFrame.Angles(0,1,0))
----------------------------------------
1
No idea if this will solve everything, but get rid of line 30 and change line 28 to Welds[1].C0 = CFrame.new(1.5,0,0)*CFrame.Angles(0,1,0) 2eggnog 981 — 9y
0
It worked! kevinnight45 550 — 9y

Answer this question