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

Ability just won't fire, why Is that?

Asked by 2 years ago

I made a tool Inside of a custom rig, what the tool does Is that It forever plays a animation which creates a AoE that slows down enemies (Currently working on It) the problem Is that tool.Activate just [bleep]ing won't fire

Notes: The script Is a server script The ability Is Inside of the custom rig The tool has RequireHandle disabled (Including ManualActivation)

Script:

local Tool = script.Parent
local Debounce = false

Tool.Activated:Connect(function()
    if not Debounce then
        Debounce = true
        print("Ello there :)")
        local JUMPSCAREMOMMENTLOL = Tool.Parent.Humanoid:FindFirstChild("Animator"):LoadAnimation(Tool.Animation)
        JUMPSCAREMOMMENTLOL:Play()
        local JUMPSCARE = Instance.new("Part",game.Workspace)
        game:GetService("Debris"):AddItem(JUMPSCARE,5)
        JUMPSCARE.Position = Tool.Parent.Torso.Position
        JUMPSCARE.Anchored = true
        JUMPSCARE.CanCollide = false
        JUMPSCARE.Transparency = 0.5
        JUMPSCARE.Shape = Enum.PartType.Ball
        JUMPSCARE.Size = Vector3.new(106.151, 106.151, 106.151)
        wait(5)
        Debounce = false
    end
end)

Answer this question