#help with animating combat

1 messages · Page 1 of 1 (latest)

daring fractal
#

i just did this simple animation and i was wondering how should i play it on code, i already have the system for running the attack script when i press a button, but, idk how to put a sword on his hand

#

the animation will run on a rig applied to the player using the applydescription thing, so idk how to put a sword alr on the avatar and just animate it with the rig

#

idk if i should spawn the sword when the attack starts and move it with the rig

#

just attaching it to the player hand wont make a good movement too

distant tangle
#

but uh it's quite simple

#

basically

#

you just export it

#

save the id

#

make a animation thingy

#

then make the script

#

i'll tell you later what to put in there

#

first do allat

#

oh nvm

#

you alreaady got that

#

to put a sword in his hand

#

you gotta remake the whole animation or just do a script that moves the sword with the arm

#

if you gon' remake the sword animation you can use a plugin that welds your sword with the arm while keeping it animatable or just do it yourself but it's a bit of a mess

#

i don't know if it works on that animator

#

since i use moon animator

daring fractal
daring fractal
#

i mean i can

distant tangle
#

if you make it a tool

daring fractal
#

but when i apply the humanoid description (to change the player avatar to it ykyk) the sword disappears

distant tangle
#

and use this exact tool on the rig you're animating

#

then yeah it should work easily

daring fractal
distant tangle
#

i mean that's how i do it in moon animator

#

i have 0 idea how it works in the roblox studio trash ahh animator

distant tangle
#

and weld it to the arm you want to animate with

#

check out a tutorial on how to weld it and stuff

#

they are not that long

daring fractal
brazen stumpBOT
#

studio** You are now Level 1! **studio

daring fractal
#

is there a way to add it before the animation?

#

and then delete it again when it ends

distant tangle
#

well if you want to do that

brazen stumpBOT
#

studio** You are now Level 3! **studio

distant tangle
#

you'd need to use scripts for that

#

to clone it

#

give it to him

#

play the animation

#

and then once it ends

#

delete it

daring fractal
#

hmmmm thx thx

#

ill try

daring fractal
#

@distant tangle i tried something

#

animation is running

#

no sword tho

#
if AbilityName == "Slash" then
        local Sword = game.ReplicatedStorage.Weapons.KrisSword:Clone()
        Sword.Parent = Character

        local oldWeld = Sword:FindFirstChildWhichIsA("Motor6D", true)
        if oldWeld then
            oldWeld:Destroy()
        end

        local RightArm = Character:WaitForChild("Right Arm")
        local BodyAttach = Sword:WaitForChild("BodyAttach")

        local weld = Instance.new("Motor6D")
        weld.Name = "RightGrip"
        weld.Part0 = RightArm
        weld.Part1 = BodyAttach
        weld.C0 = CFrame.new(0, 0, 0)
        weld.Parent = RightArm

        local Animation = game.ServerStorage.Animations.Kris.Slash
        local Slash = Character.Humanoid.Animator:LoadAnimation(Animation)

        Slash:Play()
        SS.Kris.KrisSlash:Play()

        Slash.Stopped:Connect(function()
            Sword:Destroy()
        end)
#

the animation runs but theres no sword

daring fractal
#

nvm