Hello There!
I’ve made a Ban Hammer for the enemies within my game, Nostalgia Nexus. The only issue with the Ban Hammer is the hammer itself actually.
I used this tutorial to I can animate the hammer freely without having to worry about the right arm gluing itself to the hammer. In Moon Animator, this is should it look like
As you can see, the dummy is correctly holding the hammer. Although in game, this happens
As you can see within this image, the hammer is not animated for whatever reason.
This is a local script within the Ban Hammer tool which connects the Motor6D to the players arm to the hammer.
local Tool = script.Parent
local Hammer = Tool:WaitForChild("Hammer")
local ATKEvent = Tool:WaitForChild("ATKType")
--Player
local Player = game:GetService("Players").LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
--Hum
local Humanoid = Character:WaitForChild("Humanoid")
local Animator = Humanoid:WaitForChild("Animator")
local Motor6D = Character:WaitForChild("Right Arm").ToolGrip
--Anims
local IdleAnim = Tool:WaitForChild("Idle")
local SwingAnim = Tool:WaitForChild("Wack")
--Sounds
local BAN = Hammer:WaitForChild("Ban")
--//Connections\\--
Tool.Equipped:Connect(function()
BAN:Play()
--Connecting Motor6D
Motor6D.Part0 = Character["Right Arm"]
Motor6D.Part1 = Hammer
local IdleAnimTrack = Animator:LoadAnimation(IdleAnim)
IdleAnimTrack:Play()
Tool.Unequipped:Connect(function()
IdleAnimTrack:Stop()
end)
end)