#Need help with animation not loading

1 messages · Page 1 of 1 (latest)

uncut lichen
#
local UIS = game:GetService("UserInputService")
local char = script.Parent

local slideAnim = Instance.new("Animation")
slideAnim.AnimationId = "rbxassetid://104144176066645" 

local keybind = Enum.KeyCode.E -- 
local canslide = true

UIS.InputBegan:Connect(function(input,gameprocessed)
    if gameprocessed then return end
    if not canslide then return end
    
    if input.KeyCode == keybind then
        canslide = false
        
        local playAnim = char.Humanoid:LoadAnimation(slideAnim)
        playAnim:Play()
        
        local slide = Instance.new("BodyVelocity")
        slide.MaxForce = Vector3.new(1,0,1) * 30000
        slide.Velocity = char.HumanoidRootPart.CFrame.lookVector * 100
        slide.Parent = char.HumanoidRootPart
        
        for count = 1, 8 do
            wait(0.1)
            slide.Velocity*= 0.7
        end
        playAnim:Stop()
        slide:Destroy()
        canslide = true
    end
end)

the script works fine but my animation just wont load

hearty fossil
#

try DEBUGGING it

#

maybe check if it really ends

uncut lichen
#

idk whats going on

#

imma go sleep

keen sierra
#

also, load the animation on the Animator

#

not the humanoid

uncut lichen
little scroll
#

Then it should work by then.