This localscript animation/weld works when i equip the gun then i walk and it is doesn't work when i walk then equip the gun. Why?
01 | gun = script.Parent |
02 | Player = game.Players.LocalPlayer |
03 | la = Player.Character:FindFirstChild( "Left Arm" ) |
04 | t = Player.Character:FindFirstChild( "Torso" ) |
05 | rs = Player.Character.Torso:FindFirstChild( "Right Shoulder" ) |
06 | ls = Player.Character.Torso:FindFirstChild( "Left Shoulder" ) |
07 |
08 | local function weldBetween(a, b) |
09 | local weld = Instance.new( "Weld" ) |
10 | weld.Part 0 = a |
11 | weld.Part 1 = b |
12 | weld.C 0 = CFrame.new() |
13 | weld.C 1 = b.CFrame:inverse() * a.CFrame |
14 | weld.Parent = a |
15 | return weld; |
This is just my suggestion, but maybe when your moving the Animations of the arms brakes the cframe, and The script cant seem to figure out how to load the animation when the Character animation happens like you said walking.