#problem with "animationtrack:Stop()"

1 messages · Page 1 of 1 (latest)

twin sail
#

I made some animations for a tool I have but the problem is that whenever I do
animationtrack:Stop()
it doesn't stop immediately but takes like a second or a half

code
VVVVVVVVVVVVVVVVVVVVV

local animation_hit = plr.Character.Humanoid.Animator:LoadAnimation(workspace.Animations.Axe_hit)

animation_idle.Looped = true

local debounce = false
local debounce1 = false

remote.OnServerEvent:Connect(function(plr, hit,target, camera, state)
    local axe=script.Parent
    if debounce2 == false then
        debounce2= true
        if state == "throw" then
            animation_idle:Stop()
            animation_hit:Play()
                end
        task.wait(1)
        debounce2 = false
    end
end)
--Btw i did take away some parts of code that aren't related to the animation so it would be clearer
#

I tried multiple ways like ```animationtrack:Stop(0) or
animationtrack:AdjustSpeed(9999)
(to speed up the animation so it ends but didnt work either)

rustic edge
#

its not instant

#

But I think there are ways to make it instant

glass hareBOT
#

studio** You are now Level 7! **studio

silver loom
#

i had same error switch your script type to local

#

also you can load animations beforehand

twin sail
junior fjord
# twin sail Server

you have to play the animations locally roblox it will automatically replicate to all players

#

and will stop immediately for sure

twin sail
#

thanks guys