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

Animation doesn't work properly?

Asked by
dionant 23
5 years ago

I'm trying to animate a gun. The animation seems just fine in the studio, but when I equip the tool in-game, something goes wrong.

The whole tool is connected via Motor6D, and the right arm has a Motor6D to the tool's handle. The issue seems to be in-game.

I am using this script to replace RightGrip with a Motor6D so I can play the animation.

Tool = script.Parent
function Equip()
local WeldName = "Handle"
local plr_char = script.Parent.Parent
plr_char = script.Parent.Parent
    local Right_Arm = plr_char:FindFirstChild("Right Arm")
    local Right_GripW = Right_Arm:WaitForChild("RightGrip",2)
    Right_Weld = Instance.new("Motor6D")
    Right_Weld.Part0 = Right_GripW.Part0
    Right_Weld.Part1 = Right_GripW.Part1
    Right_Weld.C0 = Right_GripW.C0
    Right_Weld.C1 = Right_GripW.C1
    Right_Weld.Parent = Right_Arm
    Right_Weld.Name = WeldName
    Right_GripW:Destroy()
end

function Unequip()
Right_Weld:Destroy()
end

script.Parent.Equipped:Connect(Equip)
script.Parent.Unequipped:Connect(Unequip)

Here are the pictures: It looks like this in the studio, but like this ingame.

¿Does anyone know what the problem is?

0
Try changing the CFrame. User#22219 20 — 5y

Answer this question