Im trying to put a hammer to a charcacter but the hammer is in the middle of the right had and the animation is not working properly
Heres a video:
The part where the character looks up, the hammer should be in the air( Like hes throwing it). I animated the hammer to be in the air and do some spins.( roblox animation plugin)
At one point i fixed it but i changed something and it broke ( i have no idea what i changed or whats the cause)
I tried adding motor6d to the arm and make the PartC0 to the hammer, the hammer is in the hand but its in the middle and the hammer is not being animated. I tried using attachments but it didnt work( I added green circles to the chacacter hand and the hammer). I tried to put fake arm but its not being animated
Heres the script i use in game>ServerScriptService
local players = game:GetService("Players")
local sword = game:GetService("ServerStorage")["hammer"]
local function giveSword(character)
local arm = character:WaitForChild("Right Arm", 1)
if (arm ~= nil) then
local s = sword:Clone()
s.Parent = character
local w = Instance.new("Motor6D")
w.Part0 = arm
w.Part1 = s
w.Parent = arm
end
end
local function connectPlayer(player)
if (player.Character ~= nil) then -- if they already spawned
giveSword(player.Character)
end
player.CharacterAdded:Connect(giveSword)
end
-- in the rare chance that players are in the game before the script runs
for _, player in ipairs(players:GetPlayers()) do
connectPlayer(player)
end
players.PlayerAdded:Connect(connectPlayer)
Im not asking for a whole script. Any help will be appreciated