i make a script that when player hold the button the animation will freeze until they release the button, it work fine before i optimize something
freeze animation
if CMoves.Animation ~= nil then
CMoves.Animation:Play()
end
if CMoves.Set == true then
if CMoves.Animation ~= nil then
CMoves.Animation:GetMarkerReachedSignal("Hold"):Once(function()
if KeyCode[Keybind] == true then
print(3)
CMoves.Animation:AdjustSpeed(0)
end
end)
end
it does print 3
animation load
function CharacterLoad(VCharacter)
Character = VCharacter
Human = Character:WaitForChild("Humanoid")
local Animator = Human:WaitForChild("Animator")
Animation = Animator:LoadAnimation(script.Hold)
ReleaseAnimation = {
[1] = Animator:LoadAnimation(script.One),
[2] = Animator:LoadAnimation(script.Two),
[3] = Animator:LoadAnimation(script.One)
}
end
keyframe