I want to stop the CFrame animation when the player is running, actually i’m using ACS 2.0.0 (R15) for testing purpose. The reload script is a model script that contains all the animations of the gun, so i can’t cancel one of them because there are waits that stops are the code. I try to make a loop and check if the player is running, but if the player runs in the middle of the reload and stop running fast the reload continues. So i don’t what i can do.
Module animation script:
self.ReloadAnim = function(Model)
local ReloadTable = {
TweenService:Create(Model[1], TweenInfo.new(.25,Enum.EasingStyle.Sine), {C1 = (CFrame.new(0.05,-0.15,.85) * CFrame.Angles(math.rad(110),math.rad(-15),math.rad(0))):inverse() }),
TweenService:Create(Model[2], TweenInfo.new(.25,Enum.EasingStyle.Sine), {C1 = (CFrame.new(-.65,0,.2) * CFrame.Angles(math.rad(110),math.rad(-15),math.rad(30))):inverse() }),
TweenService:Create(Model[1], TweenInfo.new(.5,Enum.EasingStyle.Back), {C1 = (CFrame.new(0.05,-0.15,.85) * CFrame.Angles(math.rad(100),math.rad(-5),math.rad(0))):inverse() }),
TweenService:Create(Model[2], TweenInfo.new(.25,Enum.EasingStyle.Back), {C1 = (CFrame.new(-.75,-0.15,1) * CFrame.Angles(math.rad(60),math.rad(-5),math.rad(15))):inverse() }),
TweenService:Create(Model[2], TweenInfo.new(.25,Enum.EasingStyle.Sine), {C1 = (CFrame.new(-.65,0,.2) * CFrame.Angles(math.rad(110),math.rad(-15),math.rad(30))):inverse() }),
TweenService:Create(Model[1], TweenInfo.new(.15,Enum.EasingStyle.Sine), {C1 = (CFrame.new(0.05,-0.15,.85) * CFrame.Angles(math.rad(101),math.rad(-6),math.rad(0))):inverse() })
}
ReloadTable[1]:Play()
ReloadTable[2]:Play()
wait(.25)
ReloadTable[3]:Play()
ReloadTable[4]:Play()
wait(.05)
Model[4].Handle.MagOut:Play()
Model[4].Mag.Transparency = 1
wait(.5)
Model[4].Handle.AimUp:Play()
wait(.75)
ReloadTable[5]:Play()
wait(.25)
Model[4].Handle.MagIn:Play()
ReloadTable[6]:Play()
Model[4].Mag.Transparency = 0
end
--> Idle anim
self.IdleAnim = function(objs)
TweenService:Create(objs[1], TweenInfo.new(self.DrawWeapon, Enum.EasingStyle.Sine), {C1 = self.RArmCFrame:Inverse()}):Play()
TweenService:Create(objs[2], TweenInfo.new(self.DrawWeapon, Enum.EasingStyle.Sine), {C1 = self.LArmCFrame:Inverse()}):Play()
end