#Animating Tools

1 messages · Page 1 of 1 (latest)

shut ravine
#

I switched to a system that clones the handle and sets the welds up when u equip a tool instead of it being in the tool directly BUT for some reason on this animation the "Handle" part is rotating/moving weird when it isnt doing that for the other animations? is it a blender or studio problem? because the animations,welds and tools work fine on dummys --Services
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local Motor6D = {}
local Char = script.Parent.Parent

Char.ChildAdded:Connect(function(Tool)
if Tool:IsA("Tool") and Tool:GetAttribute("Weapon") then
local Handle = ReplicatedStorage.Weapons.PhysicalWeapon[Tool.Name]:FindFirstChild("Handle")
if Handle then
local Handle = Handle:Clone()
Handle.Parent = Char
local RArm = Char:FindFirstChild("Right Arm")
local Grip = Instance.new("Motor6D")
Grip.Parent = RArm
Grip.Part0 = RArm
Grip.Part1 = Handle
Grip.C0 = Handle.Grip.C0
Grip.C1 = Handle.Grip.C1
Grip.Name = "RightGrip"
Motor6D["R"] = Grip
end
end
end)

Char.ChildRemoved:Connect(function(Tool)
if Tool:IsA("Tool") and Tool:GetAttribute("Weapon") then
for _, v in pairs(Motor6D) do
v:Destroy()
end

    for _,v in pairs(Char:GetChildren()) do
        if v.Name == "Handle" then
            v:Destroy()
        end
    end
end

end)

last musk