thank you guys but I have a problem and I cant seem to fix it
when I touch the tool on my guy, this script works perfectly
however if I push the Ai to touch this tool, it will move the Ai's arm but then it will immediately drop the tool
can somebody tell me why?
--welds
RW, LW = Instance.new("Weld"), Instance.new("Weld")
--what anim
anim = "none"
--onselected, save shoulders and get player
script.Parent.Equipped:connect(function()
wait(1)
player = script.Parent.Parent
local ch = script.Parent.Parent
RSH = ch.Torso["Right Shoulder"]
LSH = ch.Torso["Left Shoulder"]
wait(1)
GRP = ch["Right Arm"]:WaitForChild("RightGrip")
--
RSH.Parent = nil
LSH.Parent = nil
--
RW.Part0 = ch.Torso
RW.C0 = CFrame.new(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
RW.C1 = CFrame.new(0, 0.5, 0)
RW.Part1 = ch["Right Arm"]
RW.Parent = ch.Torso
_G.R = RW
--
LW.Part0 = ch.Torso
LW.C0 = CFrame.new(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
LW.C1 = CFrame.new(0, 0.5, 0)
LW.Part1 = ch["Left Arm"]
LW.Parent = ch.Torso
_G.L = LW
--
GRP.C0 = CFrame.new(0, -1, 0) * CFrame.fromEulerAnglesXYZ(-1, 0, 0)
--Bring_Arm_Up animation
for i = 0, 1, 0.05 do
wait()
RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.3*i, 0, -0.5*i)
LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.7*i, 0, 0.8*i)
LW.C1 = CFrame.new(-0.3*i, 0.5+1.2*i, 0)
end
end) |