If I have a sword welded to my character how would I animate with it? The sword is manually welded in a server script to the player’s hand. (e.g. a manualweld on the handle of a linked sword to an r6 rig.) Is there anyone who has had this problem before or knows how to fix it?
Bumping this, if anyone knows I need help
Turn the sword into an accessory, then you can tween the sword’s attachment to “animate” it.
Convert the weld to a Motor6D and animate it.
No, I just want to know how to do it.
How do I convert it to Motor6D? I just want to animate my sword. Why can’t I just edit animate with the weld? Can you please elaborate on that?
I don’t think that would work, because I want it to be a weapon, not an accessory — it’s for a game.
I don’t see why you can’t use an accessory as a weapon. After all, an accessory is just a part attached to the character with attachments, so you can still make it have collisions and trigger .Touched
events.
Just name the attachment in the accessory’s handle RightHandGripAttachment and you’re solid.
Can you show a video of what you mean? I still don’t see how an attachment of how it can have touched events or even attatch it as an accessory, I mean, because it’s a sword…
Is your sword like automatically equipped to the player? I think you could make a Transparent tool that plays an animation and it would look like the player is swinging the sword or something.
Here’s an example of an accessory sword I use for my game:
WeaponAccessory.rbxm (4.3 KB)
Here’s what the hierarchy looks like:
The RightGripAttachment allows it to snap to the right arm, and the Handle is just a part.
Here is the script for my weld. How do I make this work? I’m using the model of a linked sword tool and my player is r6.
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
local sword = game.ReplicatedStorage.GRN_WEAPONS.Sword:Clone()
sword.CFrame = case.Area.CFrame
sword.Parent = char
sword.CFrame = ((char:WaitForChild("Right Arm").CFrame * CFrame.new(0,-.7,-1.3)) * CFrame.Angles(math.rad(0),math.rad(180),math.rad(90))
local battleweld = Instance.new("ManualWeld")
battleweld.Name = "BattleWeld"
battleweld.Part0 = sword
battleweld.Part1 = char:WaitForChild("Right Arm")
battleweld.C0 = battleweld.Part0.CFrame:ToObjectSpace(battleweld.Part1.CFrame)
battleweld.Parent = battleweld.Part0
end)
end)
If you really want to use welds, just Tween the C0 of the weld to animate it.
I personally prefer the accessory method though.
Wait, I just figured out I could weld the model to a part and use a motor6d on the right arm as part0 and the part as part1. I’m going to try it now, will come back if I need help (if all else fails, i’ll assume you have the right Idea, though I really only know how to work with welds)
Motor6D’s are just welds you can animate. Delete the weld, make a Motor6D, set the Part0 to your character’s Right Hand/Right Arm, set the Part1 to your sword’s handle, set the C0 and C1 to what your weld had. and it should animate fine. There are also plugins out there that convert welds to Motor6D’s.
OHH! Thank you that makes SO much more sense.