I’ve made an animation with a sword in moon animator plugin.
Problem I’m having is, even though in the animation I animate the weapon. After I weld the weapon handle to the player using the same exact path/parts. The weapon doesn’t animate properly. Or it’s rotated wrong.
Moon animation: https://gyazo.com/94e87cbff0d2b63d8dc98934288c11cb
In game animation: https://gyazo.com/0b996c412289d4e65f10e71c9a03f680 (sword is sideways)
My rig motor6d weld path: https://gyazo.com/b67216d66446402fec02c03c0757e5ac
My scripts:
Client script that fires motor6d info to server
local player = game:GetService("Players").LocalPlayer.Character
local weld = script.Parent
local tool = script.Parent.Parent:WaitForChild("Handle")
local event = game.ReplicatedStorage.Equip
local tool = script.Parent.Parent.Parent.Katana
tool.Equipped:Connect(function()
local weld = script.Parent
local tool = script.Parent.Parent:FindFirstChild("Handle")
if tool then
event:FireServer(weld, tool)
else
print(tool)
end
end)
My server weld script (I even remove the default tool grip weld):
local event = game.ReplicatedStorage.Equip
event.OnServerEvent:Connect(function(plr, weld, tool)
local char = plr.Character
if not char or not weld or not tool then
return
end
if tool.Name == "Handle" then
local rightHand = char:FindFirstChild("RightHand")
if not rightHand then
warn("RightHand not found")
return
end
--weld.Parent = rightHand
weld.Name = "HandleWeld"
weld.Part0 = rightHand
weld.Part1 = tool
-- Remove Roblox's default tool grip
task.wait()
local rightGrip = rightHand:FindFirstChild("RightGrip")
if rightGrip then
rightGrip:Destroy()
print("Destroyed RightGrip")
end
end
end)
Any idea what I’m doing wrong?