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

Custom Rig Animation not playing Its slash animation (?)

Asked by 2 years ago

Hello!

So, I made a custom rig with only "three" bodyparts (Besides the HumanoidRootPart).

Head, Torso, And a katana, the katana Is a model, and Inside of the model Is parts of the katana

I animated the custom rig, the animation Is just the custom rig slashing Its katana

I added a script Inside of a tool (The tool Is Inside of the custom rig btw):

local Tool = script.Parent
local CanDamage = false
local Debounce = false
local Troll = Tool.Parent

Tool.Activated:Connect(function()
    if not Debounce then
        Debounce = true
        CanDamage = true
        Troll.Humanoid.Jump = true
        wait(0.1)
        local Anim = Tool.Parent.Humanoid:FindFirstChild("WheelChairAnimator"):LoadAnimation(Tool.Parent.Animation)
        Anim:Play()
        local DashAttack = Instance.new("VectorForce",Troll.Torso)
        local Attachment = Instance.new("Attachment",Troll.Torso)
        DashAttack.Attachment0 = Attachment
        DashAttack.ApplyAtCenterOfMass = true
        DashAttack.Force = Vector3.new(0,300,6000)
        game:GetService("Debris"):AddItem(DashAttack,0.5)
        game:GetService("Debris"):AddItem(Attachment,0.5)
        wait(1)
        Debounce = false
        CanDamage = false
    end
end)

Troll["Wheelchair katana"].Blade.Touched:Connect(function(hit)
    local Humanoid = hit.Parent:WaitForChild("Humanoid")
    if Humanoid and CanDamage == true and Humanoid.Parent.IsMetal.Value == false then
        Humanoid:TakeDamage(40)
        CanDamage = false
    elseif Humanoid and CanDamage == true and Humanoid.Parent.IsMetal.Value == true then
        Humanoid:TakeDamage(math.random(2,3))
        CanDamage = false
    end
end)

The problem Is that It literally does nothing

Answer this question