Hello! Today I was trying to make a knife flip animation, But I want the actual knife Tool/Model to move with the animation as it flips like in the Animation Editor. Is this even possible? if so can anyone try and help me out Thank You!
You’ll need to create a Motor6D when the tool is equipped. Have the Part0 be the Arm and Part1 be the Handle. Name said Motor6D to the same name you named the Motor6D that the animation dummy has. Then you’ll have to destroy the tool’s weld in the character’s right arm and parent the Motor6D into the right arm.
This is what I did but it’s throwing errors in the console
local char = script.Parent.Parent
local tool = script.Parent
local Player
tool.Equipped:Connect(function()
script.Parent["RightArm"]:WaitForChild("RightGrip"):Destroy()
Player = script.Parent.Parent.Name
local M6D = Instance.new("Motor6D", script.Parent.Parent["RightArm"])
M6D.Name = "Handle"
M6D.Part0 = script.Parent.Parent["RightArm"]
M6D.Part1 = tool.Handle
end)
tool.Unequipped:Connect(function()
if game.Players[Player].Character["RightArm"]:FindFirstChild("Handle") then
game.Players[Player].Character["RightArm"].Handle:Destroy()
end
Player = nil
end)
You accidentlly forgot to add another Parent, and accidentally spelled the Right Arm incorrectly. Try writing that line as: script.Parent.Parent:WaitForChild("Right Arm"):WaitForChild("RightGrip"):Destroy()