Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Character + tool animation does not work, how to fix it?

I'm trying to make an FPS rifle, animated** with a player**, I connected the weapon with MOTOR 6D and created a script which** after equipping the tool**, creates Motor6D and connects the character with the weapon model, the connection works, but the animations about the rifle do not work .. and they look like this: https://ctrlv.cz/HueO

how could i fix it?

1 comment

0

Please make sure to attach code for review.

2 answers

✓ Accepted answer

Okay so first things first.

If it's a weld to the character, make sure you're not using a copied MOTOR6D when animating your dummy.

**Quick Explanation: ** If you're animating your tool and you place your MOTOR6D, make sure it's not connected a copy from for example Right Hip, Neck or other motor6d's already attached to the dummy. And make sure in the command bar you type "Instance.new("Motor6D",workspace). Use that motor6d and attach your parts into it..

If it's a tool, Also apply the rules above to the tool, however make sure the package you use on that specific character is the same. Else, it could have a different affect.

when animating, I was the first to combine a "Rig" weapon, which had all the joints inserted in the BodyAttach section, and the second Dig: "Dummy" and it had all the joints in Torso, this is a script that, after equipping, connects these two Rigs:

local:

local WeaponTool = script.Parent
script.Parent.Equipped: Connect (function ()
local anim = script.Parent.Animation


game.ReplicatedStorage.ConnectM6D: FireServer (script.Parent.M16A4 .BodyAttach, script.Parent.M16A4)
local char = workspace: FindFirstChild (game.Players.LocalPlayer.Name)
char.Torso.ToolGrip.Part0 = char.Torso
char.Torso.ToolGrip.Part1 = script.Parent.M16A4 .BodyAttach
local La = script.Parent.Parent.Humanoid: LoadAnimation (anim)
La: Play ()
end)

WeaponTool.Unequipped: Connect (function ()

game.ReplicatedStorage.DisconnectM6D: FireServer ()

end)

server:

game.Players.PlayerAdded: Connect (function (plr)
plr.CharacterAdded: Connect (function (char)

local M6D = Instance.new ("Motor6D", char.Torso)
M6D.Name = "ToolGrip"
        end)
end)

game.ReplicatedStorage.ConnectM6D.OnServerEvent: Connect (function (plr, location, it)

      local char = plr.Character
      char.Torso.ToolGrip.Part0 = char.Torso
      char.Torso.ToolGrip.Part1 = location



end)

game.ReplicatedStorage.DisconnectM6D.OnServerEvent: Connect (function (plr)
    plr.Character.Torso.ToolGrip.Part1 = nil
end)

1 comment

0

BtW: The weapon looks like this: https://ctrlv.cz/jhJ0

This discussion is preserved as it was. New answers, comments, and votes are closed.