#Attack animations

30 messages · Page 1 of 1 (latest)

buoyant otter
#

Can you show me your script?

limpid glade
#

do you want to see them both?

buoyant otter
limpid glade
#

One had a local and server

#

another one was inside the sword

#

Ill show you

#

okay heres the first script

#

the one with 2 attack animations

#

--CONFIGURATION
local Turn = 1
local Damage = 20
local Cooldown = 0.03
--END

script.Parent.Activated:Connect(function()
if script.Parent.Cooldown.Value == false then
script.Parent.Cooldown.Value = true
script.Parent.CanDamage.Value = true

    local Humanoid = script.Parent.Parent.Humanoid
    local Anim1 = Humanoid:LoadAnimation(script.Parent.Attack1)
    local Anim2 = Humanoid:LoadAnimation(script.Parent.Attack2)


    if Turn == 1 then
        Anim1:Play()
        Turn = 2

        Anim1.Stopped:wait(Cooldown)
        script.Parent.CanDamage.Value = false
        script.Parent.Cooldown.Value = false

    elseif Turn == 2 then
        Anim2:Play()
        Turn = 1

        Anim2.Stopped:Wait(Cooldown)
        script.Parent.CanDamage.Value = false
        script.Parent.Cooldown.Value = false
    end
else
    return
end

end)

script.Parent.Handle.Touched:Connect(function(Hit)
if Hit.Parent:FindFirstChild("Humanoid") then
local Humanoid = Hit.Parent.Humanoid

    if script.Parent.CanDamage.Value == true then
        Humanoid:TakeDamage(Damage)
        script.Parent.CanDamage.Value = false
    else
        return
    end
else
    return
end

end)

#

there is no problem with this one

#

but I need more swings than 2

#

and then for the second one

#

this is the local script

#

local RS = game:GetService("ReplicatedStorage")
local Tool = script.Parent

Tool.Activated:Connect(function()
RS.Events.Swing:FireServer(script.Parent)
end)

#

this one just doesnt even work

buoyant otter
#

and in each one change the line
in Turn 2 to you need to make it 3, in turn 3 you need to make it 4, and so on.

#

At turn 5 you need to change Turn to 1 so it's getting a reset just like right now in turn 2

#

@limpid glade

limpid glade
#

im not following

buoyant otter
limpid glade
#

None

buoyant otter
# limpid glade None

You should get even the knowgledge about variables and such, because I'm not really about writing this for you.

limpid glade
#

I think you misunderstood me

mortal atlasBOT
#

studio** You are now Level 2! **studio

limpid glade
#

Im asking how to add more swings to the script

buoyant otter