Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

I am making a sword and wonder why does this script not work ?

Asked by 5 years ago
local CanAttack = true
local i = script:WaitForChild("Idle")
local a = script:WaitForChild("Attack")
local hum = script.Parent.Parent:WaitForChild("Humanoid")
i.Parent = hum
a.Parent = hum
local idle = hum:LoadAnimation(i)
local attack = hum:LoadAnimation(a)
script.Parent.Equipped:connect(function()
    idle:Play()
end)
script.Parent.Activated:connect(function()
if CanAttack == true then
    attack:Play()
    idle:Stop()
    wait(1)
    attack:Stop()
    idle:Play()
    CanAttack = true
    script.Parent.CanDamage.Value = true
    end
end)

0
Did you use eppobots tutorial? i found that tutorial very useful and because of it i made my own fully functioning sword with my own animations yayachik1 -11 — 5y
0
i tried but it did not work DarkModule 34 — 5y
0
What errors are you getting PoePoeCannon 519 — 5y
0
none DarkModule 34 — 5y

Answer this question