#disable default animation

9 messages · Page 1 of 1 (latest)

cyan portal
#

how can i disable the idle animations while my animations are playing? all of the custom made animations are hampered by the default animations, is there a way to disable them while mines are playing?

local replicatedStorage = game:GetService("ReplicatedStorage")
local players = game:GetService("Players")
local Debounce = {}
local DebounceDuration = 5

local function fn(player)
    local character = player.Character or player.CharacterAdded:Wait()
    if character == nil then return end
    if not character:FindFirstChild("Humanoid") then return end
    if character.Humanoid.Health == 0 then return end
    if Debounce[player] then return end
    
    Debounce[player] = true
    local BangAni = character.Humanoid.Animator:LoadAnimation(script.Bang)

    ```
            (Stop Default animations here)
```lua
    BangAni:Play()
    
    
    task.spawn(function()
        wait(DebounceDuration)
        if Debounce[player] then
            Debounce[player] = nil
```                                                       (reEnable them here)
```lua
        end
        
    end)
end

replicatedStorage.PUMP.OnServerEvent:Connect(fn)
#

i was looking at the animation documantation but couldnt find a method that disabled animations

boreal nova
#

You need to change the animation priority to be above the default character animations.

#

If you want to completely still disable them you can disable the animate local script locals inside the character.

cyan portal
#

ill check out animation priority, thank you

cyan portal
# boreal nova If you want to completely still disable them you can disable the animate local s...

if you dont mind me asking, do you know what might be causing this script to take a CFrame from before the Keyframe labeled "damage", instead of the CFrame of the "damage" keyframe (its the last keyframe)?

local punchAnimation = character.Humanoid.Animator:LoadAnimation(script.Punch)
        
        coroutine.wrap(slow)(player,punchAnimation.length)
        punchAnimation:Play()
        
        punchAnimation.KeyframeReached:Connect(function(keyframeName)
            
            if keyframeName ~= "damage" then 
                print("hi")
            end
            
            
            
            
            
            local cf = player.Character.HumanoidRootPart.CFrame
            local size = Vector3.new(3,2,2)
            
            local HBV = Instance.new("Part")
            HBV.Color = Color3.new(1, 0, 0)
            HBV.Anchored = true
            HBV.CanCollide = false
            HBV.CanQuery = false
            HBV.CanTouch = false
            HBV.CFrame = cf * CFrame.new(1, 0, -3)
            HBV.Size = size
            HBV.Transparency = 0.5
            HBV.Parent = workspace

https://medal.tv/games/roblox-studio/clips/i0r6tYdGjC5ftS4wb/d13379nwyN95?invite=cr-MSxnQWMsMjc3NzA0NjUs

Watch Untitled and millions of other Roblox Studio videos on Medal, the largest Game Clip Platform.

▶ Play video
boreal nova
cyan portal
#

ill look more into it, thanks for the input though!