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
Please make sure to attach code for review.