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

How would I add a weapon to an animation rig?

Asked by 6 years ago

When using the animation plugin, how would I add it so the rig is holding something and the item he's holding moves with his arm?

1 answer

Log in to vote
1
Answered by
Vulkarin 581 Moderation Voter
6 years ago
Edited 6 years ago

Unless I am unaware of something built into the plugin I would do it with welds

You can read of welds here http://wiki.roblox.com/index.php?title=Weld But basically you just need to weld together the handle of the weapon to the NPC's hand/arm (depending on R6 or R15)

local hand = workspace.anNPC.RightHand --If R15
local handle = workspace.aWeapon.Handle

local w = Instance.new("Weld",hand)
w.Part0 = hand
w.Part1 = handle
w.C0 = hand.CFrame:toObjectSpace(handle.CFrame)

Please make sure that the weapon is unanchored or it will not work

0
Thanks to the new constraint system, You could even just add a part as the weapon and, selecting both the weapon and the hand of the rig, go into: Model Tab > Constraints section > "Create" dropdown > weld DropshipPilot 148 — 6y
Ad

Answer this question