Cframe inspect animation cancelling

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!

I want to stop the inspect animation everytime I do certain actions like: shoving, charging, attacking and blocking

  1. What is the issue? Include screenshots / videos if possible!

I don’t know how to do it, in another place of mine I tried to add a new variable that would make you unable to inspect until you did certain actions, but if you would spam the inspect button then do other actions it would mash up together the tweens

local function animateviewmodel(what, rarm, larm)
spawn(function()
	if what == "idle" then

		tween(rarm, TweenInfo.new(1, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(2.04, -2.859, -2.378)*makecforientation(11.783, -176.243, 139.519)}):Play()
		tween(larm, TweenInfo.new(1, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(-2.108, -2.35, -2.473)*makecforientation(15, 176.068, -135.791)}):Play()

	--	tween(torso, TweenInfo.new(0.75, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(0,0,0)*makecforientation(0, 0, 0)}):Play()
	--	tween(head, TweenInfo.new(0.75, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(0, 1.5, 0)*makecforientation(0, 0, 0)}):Play()	
		--	larm.C0 = makecframes(newcf(-1.017, -0.069, -0.757))

	elseif what == "charging" then


		tween(rarm, TweenInfo.new(0.4, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {C0 = newcf(3.944, -1.015, 0.44)*makecforientation(2.977, 123.668, 83.884)}):Play()
		tween(larm, TweenInfo.new(0.4, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {C0 = newcf(-2.586, -2.207, -1.244)*makecforientation(-9.96, -124.692, -88.174)}):Play()

	--	tween(torso, TweenInfo.new(0.75, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {C0 = newcf(0,0,0)*makecforientation(0, -30, 0)}):Play()
	--	tween(head, TweenInfo.new(0.75, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {C0 = newcf(0, 1.5, 0)*makecforientation(0, 30, 0)}):Play()

		elseif what == "jab" then


			tween(rarm, TweenInfo.new(0.3, Enum.EasingStyle.Elastic, Enum.EasingDirection.Out), {C0 = newcf(0.885, -1.604, -2.245)*makecforientation(-7.428, 99.268, 87.406)}):Play()
			tween(larm, TweenInfo.new(0.3, Enum.EasingStyle.Elastic, Enum.EasingDirection.Out), {C0 = newcf(-2.046, -4.466, -1.9)*makecforientation(15, 176.068, -135.791)}):Play()

			--	tween(torso, TweenInfo.new(0.1, Enum.EasingStyle.Elastic, Enum.EasingDirection.Out), {C0 = newcf(0,0,0)*makecforientation(0, 30, 0)}):Play()
			--	tween(head, TweenInfo.new(0.1, Enum.EasingStyle.Elastic, Enum.EasingDirection.Out), {C0 = newcf(0, 1.5, 0)*makecforientation(0, -30, 0)}):Play()

			wait(0.3)

			tween(rarm, TweenInfo.new(1, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(2.04, -2.859, -2.378)*makecforientation(11.783, -176.243, 139.519)}):Play()
			tween(larm, TweenInfo.new(1, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(-2.108, -2.35, -2.473)*makecforientation(15, 176.068, -135.791)}):Play()
			--	tween(torso, TweenInfo.new(0.75, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(0,0,0)*makecforientation(0, 0, 0)}):Play()
			--	tween(head, TweenInfo.new(0.75, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(0, 1.5, 0)*makecforientation(0, 0, 0)}):Play()
		elseif what == "hitjab" then


			tween(rarm, TweenInfo.new(0.2, Enum.EasingStyle.Elastic, Enum.EasingDirection.Out), {C0 = newcf(0.885, -1.604, -2.245)*makecforientation(-7.428, 99.268, 87.406)}):Play()
			tween(larm, TweenInfo.new(0.2, Enum.EasingStyle.Elastic, Enum.EasingDirection.Out), {C0 = newcf(-2.046, -4.466, -1.9)*makecforientation(15, 176.068, -135.791)}):Play()

			--	tween(torso, TweenInfo.new(0.1, Enum.EasingStyle.Elastic, Enum.EasingDirection.Out), {C0 = newcf(0,0,0)*makecforientation(0, 30, 0)}):Play()
			--	tween(head, TweenInfo.new(0.1, Enum.EasingStyle.Elastic, Enum.EasingDirection.Out), {C0 = newcf(0, 1.5, 0)*makecforientation(0, -30, 0)}):Play()

			wait(0.19)

if not stunned then
			tween(rarm, TweenInfo.new(.5, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(2.04, -2.859, -2.378)*makecforientation(11.783, -176.243, 139.519)}):Play()
			tween(larm, TweenInfo.new(.5, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(-2.108, -2.35, -2.473)*makecforientation(15, 176.068, -135.791)}):Play()
			--	tween(torso, TweenInfo.new(0.75, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(0,0,0)*makecforientation(0, 0, 0)}):Play()
			--	tween(head, TweenInfo.new(0.75, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(0, 1.5, 0)*makecforientation(0, 0, 0)}):Play()
end
		elseif what == "charge" then
			tween(rarm, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {C0 = newcf(-8.46, -2.543, -2.968)*makecforientation(-10.896, 134.908, 85.729)}):Play()
			tween(larm, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {C0 = newcf(-3.407, -3.055, -0.319)*makecforientation(-9.96, -124.692, -88.174)}):Play()
			--	tween(torso, TweenInfo.new(0.25, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(0,0,0)*makecforientation(0, 50, 0)}):Play()
			--	tween(head, TweenInfo.new(0.25, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(0, 1.5, 0)*makecforientation(0, -50, 0)}):Play()

			wait(0.7)

			tween(rarm, TweenInfo.new(0.9, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {C0 = newcf(2.04, -2.859, -2.378)*makecforientation(11.783, -176.243, 139.519)}):Play()
			tween(larm, TweenInfo.new(0.9, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {C0 = newcf(-2.108, -2.35, -2.473)*makecforientation(15, 176.068, -135.791)}):Play()
			--	tween(torso, TweenInfo.new(0.75, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(0,0,0)*makecforientation(0, 0, 0)}):Play()
			--	tween(head, TweenInfo.new(0.75, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(0, 1.5, 0)*makecforientation(0, 0, 0)}):Play()
		elseif what == "hitcharge" then
			tween(rarm, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {C0 = newcf(-8.46, -2.543, -2.968)*makecforientation(-10.896, 134.908, 85.729)}):Play()
			tween(larm, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {C0 = newcf(-3.407, -3.055, -0.319)*makecforientation(-9.96, -124.692, -88.174)}):Play()
			--	tween(torso, TweenInfo.new(0.25, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(0,0,0)*makecforientation(0, 50, 0)}):Play()
			--	tween(head, TweenInfo.new(0.25, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(0, 1.5, 0)*makecforientation(0, -50, 0)}):Play()

			wait(0.4)
			if not stunned then
			tween(rarm, TweenInfo.new(0.4, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {C0 = newcf(2.04, -2.859, -2.378)*makecforientation(11.783, -176.243, 139.519)}):Play()
			tween(larm, TweenInfo.new(0.4, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {C0 = newcf(-2.108, -2.35, -2.473)*makecforientation(15, 176.068, -135.791)}):Play()
			--	tween(torso, TweenInfo.new(0.75, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(0,0,0)*makecforientation(0, 0, 0)}):Play()
			--	tween(head, TweenInfo.new(0.75, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(0, 1.5, 0)*makecforientation(0, 0, 0)}):Play()

end
		elseif what == "block" then
			tween(rarm, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {C0 = newcf(0.67, -0.597, -2)*makecforientation(2.5, -105.013, -175.944)}):Play()
			tween(larm, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {C0 = newcf(-0.67, -0.597, -2)*makecforientation(2.5, 105.366, 175.964)}):Play()
			--	tween(torso, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {C0 = newcf(0,0,0)*makecforientation(0, 0, 0)}):Play()
			--	tween(head, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {C0 = newcf(0, 1.5, 0)*makecforientation(0, 0, 0)}):Play()
			
		elseif what == "stunned" then
			wait(0.1)
			tween(rarm, TweenInfo.new(0.75, Enum.EasingStyle.Quad, Enum.EasingDirection.In), {C0 = newcf(3.437, -1.032, -1.985)*makecforientation(-13.962, 131.614, 165.643)}):Play()
			tween(larm, TweenInfo.new(0.75, Enum.EasingStyle.Quad, Enum.EasingDirection.In), {C0 = newcf(-3.437, -1.032, -1.985)*makecforientation(-13.962, -131.614, -165.643)}):Play()
			--	tween(torso, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {C0 = newcf(0,0,0)*makecforientation(0, 0, 0)}):Play()
			--	tween(head, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {C0 = newcf(0, 1.5, 0)*makecforientation(0, 0, 0)}):Play()
			
			wait(0.75)
			tween(rarm, TweenInfo.new(0.75, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {C0 = newcf(3.043, -3.97, -1.882)*makecforientation(-4.703, 81.715, 84.3)}):Play()
			tween(larm, TweenInfo.new(0.75, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {C0 = newcf(-3.043, -3.97, -1.882)*makecforientation(-4.703, -81.715, -84.3)}):Play()
wait(0.65)
if not charging then
			tween(rarm, TweenInfo.new(1, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(2.04, -2.859, -2.378)*makecforientation(11.783, -176.243, 139.519)}):Play()
			tween(larm, TweenInfo.new(1, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(-2.108, -2.35, -2.473)*makecforientation(15, 176.068, -135.791)}):Play()
			end
	elseif what == "shove" then
			tween(rarm, TweenInfo.new(0.05, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {C0 = newcf(1.473, -1.611, 1.062)*makecforientation(20, 90, 90)}):Play()
			tween(larm, TweenInfo.new(0.05, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {C0 = newcf(-1.473, -1.611, 1.062)*makecforientation(20, -90, -90)}):Play()
	--	tween(torso, TweenInfo.new(0.3, Enum.EasingStyle.Elastic, Enum.EasingDirection.Out), {C0 = newcf(0,0,0)*makecforientation(-10, 0, 0)}):Play()
	--	tween(head, TweenInfo.new(0.3, Enum.EasingStyle.Elastic, Enum.EasingDirection.Out), {C0 = newcf(0, 1.483, 0.098)*makecforientation(10, 0, 0)}):Play()

		wait(0.05)

			tween(rarm, TweenInfo.new(0.2, Enum.EasingStyle.Elastic, Enum.EasingDirection.Out), {C0 = newcf(1.386, -1.237, -1.79)*makecforientation(-4.778, 95.348, 92.77)}):Play()
			tween(larm, TweenInfo.new(0.2, Enum.EasingStyle.Elastic, Enum.EasingDirection.Out), {C0 = newcf(-1.386, -1.237, -1.79)*makecforientation(-4.778, -95.348, -92.77)}):Play()
	--	tween(torso, TweenInfo.new(0.75, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(0,0,0)*makecforientation(0, 0, 0)}):Play()
	--	tween(head, TweenInfo.new(0.75, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(0, 1.5, 0)*makecforientation(0, 0, 0)}):Play()
	
	wait(0.2)
	
			tween(rarm, TweenInfo.new(0.04, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {C0 = newcf(1.221, -1.289, -1.197)*makecforientation(1.443, 75.701, 94.23)}):Play()
			tween(larm, TweenInfo.new(0.04, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut), {C0 = newcf(-1.221, -1.289, -1.197)*makecforientation(1.443, -75.701, -94.23)}):Play()
	
	wait(0.04)
	
			tween(rarm, TweenInfo.new(0.8, Enum.EasingStyle.Back, Enum.EasingDirection.InOut), {C0 = newcf(2.04, -2.859, -2.378)*makecforientation(11.783, -176.243, 139.519)}):Play()
			tween(larm, TweenInfo.new(0.8, Enum.EasingStyle.Back, Enum.EasingDirection.InOut), {C0 = newcf(-2.108, -2.35, -2.473)*makecforientation(15, 176.068, -135.791)}):Play()
			
	elseif what == "inspect" then -- how would i stop the inspect animation after doing certain actions like blocking, charging, attacking and shoving?
		

			tween(rarm, TweenInfo.new(1, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(1.375, -1.379, -2.854)*makecforientation(21.266, -111.793, -166.997)}):Play()
			tween(larm, TweenInfo.new(1, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(-1.418, -1.4, -2.941)*makecforientation(21.266, 111.793, 166.997)}):Play()
			
			wait(3)
			

			tween(rarm, TweenInfo.new(0.8, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(1.375, -1.379, -2.854)*makecforientation(-13.259, 98.633, 153.264)}):Play()
			tween(larm, TweenInfo.new(0.8, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(-1.375, -1.379, -2.854)*makecforientation(-13.259, -98.633, -153.264)}):Play()
			
			wait(3)
			
			tween(rarm, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {C0 = newcf(3.281, -1.956, -2.945)*makecforientation(19.466, -172.829, -158.449)}):Play()
			tween(larm, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {C0 = newcf(-3.281, -1.956, -2.945)*makecforientation(19.466, 172.829, 158.449)}):Play()
			
			wait(0.3)
			
			tween(rarm, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {C0 = newcf(0.846, -2.132, -3.123)*makecforientation(20.812, -173.889, 156.776)}):Play()
			tween(larm, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {C0 = newcf(-1.041, -2.066, -3.094)*makecforientation(17.406, -176.157, -158.509)}):Play()
			
			wait(0.45)
			
			tween(rarm, TweenInfo.new(1, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(2.04, -2.859, -2.378)*makecforientation(11.783, -176.243, 139.519)}):Play()
			tween(larm, TweenInfo.new(1, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(-2.108, -2.35, -2.473)*makecforientation(15, 176.068, -135.791)}):Play()
	end
end)
end

This tool is based on the combat system from goo animal simulator which is inspired from Untitled Melee Game which is inspired from the game The Culling from steam

Add a debounce.

Gogxogxogxoxgoxigxi extra characters

I’m trying to replicate this game

In which I dont think it would work a debounce on a game where you could inspect without any cooldowns

You could store the currently playing tweens in a table and when there’s a new action, use Tween::Pause or Tween::Cancel on them before starting the new tween

1 Like

Alright I will try that
ddddddd

It worked, although if I try to inspect again it glitches

local inspectanimtweens = {}

local function animateviewmodel(what, rarm, larm)

spawn(function()
	--	for i,v in pairs(inspectanimtweens) do
			table.clear(inspectanimtweens)

			--v:Cancel()
			--v:Destroy()
			--	v:Cancel()
	--	end
		repeat wait() until not next(inspectanimtweens)

	if what == "idle" then

		tween(rarm, TweenInfo.new(1, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(2.04, -2.859, -2.378)*makecforientation(11.783, -176.243, 139.519)}):Play()
		tween(larm, TweenInfo.new(1, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(-2.108, -2.35, -2.473)*makecforientation(15, 176.068, -135.791)}):Play()

	--	tween(torso, TweenInfo.new(0.75, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(0,0,0)*makecforientation(0, 0, 0)}):Play()
	--	tween(head, TweenInfo.new(0.75, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(0, 1.5, 0)*makecforientation(0, 0, 0)}):Play()	
		--	larm.C0 = makecframes(newcf(-1.017, -0.069, -0.757))

	elseif what == "charging" then


		tween(rarm, TweenInfo.new(0.4, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {C0 = newcf(3.944, -1.015, 0.44)*makecforientation(2.977, 123.668, 83.884)}):Play()
		tween(larm, TweenInfo.new(0.4, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {C0 = newcf(-2.586, -2.207, -1.244)*makecforientation(-9.96, -124.692, -88.174)}):Play()

	--	tween(torso, TweenInfo.new(0.75, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {C0 = newcf(0,0,0)*makecforientation(0, -30, 0)}):Play()
	--	tween(head, TweenInfo.new(0.75, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {C0 = newcf(0, 1.5, 0)*makecforientation(0, 30, 0)}):Play()

		elseif what == "jab" then


			tween(rarm, TweenInfo.new(0.3, Enum.EasingStyle.Elastic, Enum.EasingDirection.Out), {C0 = newcf(0.885, -1.604, -2.245)*makecforientation(-7.428, 99.268, 87.406)}):Play()
			tween(larm, TweenInfo.new(0.3, Enum.EasingStyle.Elastic, Enum.EasingDirection.Out), {C0 = newcf(-2.046, -4.466, -1.9)*makecforientation(15, 176.068, -135.791)}):Play()

			--	tween(torso, TweenInfo.new(0.1, Enum.EasingStyle.Elastic, Enum.EasingDirection.Out), {C0 = newcf(0,0,0)*makecforientation(0, 30, 0)}):Play()
			--	tween(head, TweenInfo.new(0.1, Enum.EasingStyle.Elastic, Enum.EasingDirection.Out), {C0 = newcf(0, 1.5, 0)*makecforientation(0, -30, 0)}):Play()

			wait(0.3)

			tween(rarm, TweenInfo.new(1, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(2.04, -2.859, -2.378)*makecforientation(11.783, -176.243, 139.519)}):Play()
			tween(larm, TweenInfo.new(1, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(-2.108, -2.35, -2.473)*makecforientation(15, 176.068, -135.791)}):Play()
			--	tween(torso, TweenInfo.new(0.75, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(0,0,0)*makecforientation(0, 0, 0)}):Play()
			--	tween(head, TweenInfo.new(0.75, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(0, 1.5, 0)*makecforientation(0, 0, 0)}):Play()
		elseif what == "hitjab" then


			tween(rarm, TweenInfo.new(0.2, Enum.EasingStyle.Elastic, Enum.EasingDirection.Out), {C0 = newcf(0.885, -1.604, -2.245)*makecforientation(-7.428, 99.268, 87.406)}):Play()
			tween(larm, TweenInfo.new(0.2, Enum.EasingStyle.Elastic, Enum.EasingDirection.Out), {C0 = newcf(-2.046, -4.466, -1.9)*makecforientation(15, 176.068, -135.791)}):Play()

			--	tween(torso, TweenInfo.new(0.1, Enum.EasingStyle.Elastic, Enum.EasingDirection.Out), {C0 = newcf(0,0,0)*makecforientation(0, 30, 0)}):Play()
			--	tween(head, TweenInfo.new(0.1, Enum.EasingStyle.Elastic, Enum.EasingDirection.Out), {C0 = newcf(0, 1.5, 0)*makecforientation(0, -30, 0)}):Play()

			wait(0.19)

if not stunned then
			tween(rarm, TweenInfo.new(.5, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(2.04, -2.859, -2.378)*makecforientation(11.783, -176.243, 139.519)}):Play()
			tween(larm, TweenInfo.new(.5, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(-2.108, -2.35, -2.473)*makecforientation(15, 176.068, -135.791)}):Play()
			--	tween(torso, TweenInfo.new(0.75, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(0,0,0)*makecforientation(0, 0, 0)}):Play()
			--	tween(head, TweenInfo.new(0.75, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(0, 1.5, 0)*makecforientation(0, 0, 0)}):Play()
end
		elseif what == "charge" then
			tween(rarm, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {C0 = newcf(-8.46, -2.543, -2.968)*makecforientation(-10.896, 134.908, 85.729)}):Play()
			tween(larm, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {C0 = newcf(-3.407, -3.055, -0.319)*makecforientation(-9.96, -124.692, -88.174)}):Play()
			--	tween(torso, TweenInfo.new(0.25, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(0,0,0)*makecforientation(0, 50, 0)}):Play()
			--	tween(head, TweenInfo.new(0.25, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(0, 1.5, 0)*makecforientation(0, -50, 0)}):Play()

			wait(0.5)

			tween(rarm, TweenInfo.new(0.9, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {C0 = newcf(2.04, -2.859, -2.378)*makecforientation(11.783, -176.243, 139.519)}):Play()
			tween(larm, TweenInfo.new(0.9, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {C0 = newcf(-2.108, -2.35, -2.473)*makecforientation(15, 176.068, -135.791)}):Play()
			--	tween(torso, TweenInfo.new(0.75, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(0,0,0)*makecforientation(0, 0, 0)}):Play()
			--	tween(head, TweenInfo.new(0.75, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(0, 1.5, 0)*makecforientation(0, 0, 0)}):Play()
		elseif what == "hitcharge" then
			tween(rarm, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {C0 = newcf(-8.46, -2.543, -2.968)*makecforientation(-10.896, 134.908, 85.729)}):Play()
			tween(larm, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {C0 = newcf(-3.407, -3.055, -0.319)*makecforientation(-9.96, -124.692, -88.174)}):Play()
			--	tween(torso, TweenInfo.new(0.25, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(0,0,0)*makecforientation(0, 50, 0)}):Play()
			--	tween(head, TweenInfo.new(0.25, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(0, 1.5, 0)*makecforientation(0, -50, 0)}):Play()

			wait(0.4)
			if not stunned then
			tween(rarm, TweenInfo.new(0.4, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {C0 = newcf(2.04, -2.859, -2.378)*makecforientation(11.783, -176.243, 139.519)}):Play()
			tween(larm, TweenInfo.new(0.4, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {C0 = newcf(-2.108, -2.35, -2.473)*makecforientation(15, 176.068, -135.791)}):Play()
			--	tween(torso, TweenInfo.new(0.75, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(0,0,0)*makecforientation(0, 0, 0)}):Play()
			--	tween(head, TweenInfo.new(0.75, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(0, 1.5, 0)*makecforientation(0, 0, 0)}):Play()

end
		elseif what == "block" then
			tween(rarm, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {C0 = newcf(0.67, -0.597, -2)*makecforientation(2.5, -105.013, -175.944)}):Play()
			tween(larm, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {C0 = newcf(-0.67, -0.597, -2)*makecforientation(2.5, 105.366, 175.964)}):Play()
			--	tween(torso, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {C0 = newcf(0,0,0)*makecforientation(0, 0, 0)}):Play()
			--	tween(head, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {C0 = newcf(0, 1.5, 0)*makecforientation(0, 0, 0)}):Play()
			
		elseif what == "stunned" then
			wait(0.1)
			tween(rarm, TweenInfo.new(0.75, Enum.EasingStyle.Quad, Enum.EasingDirection.In), {C0 = newcf(3.437, -1.032, -1.985)*makecforientation(-13.962, 131.614, 165.643)}):Play()
			tween(larm, TweenInfo.new(0.75, Enum.EasingStyle.Quad, Enum.EasingDirection.In), {C0 = newcf(-3.437, -1.032, -1.985)*makecforientation(-13.962, -131.614, -165.643)}):Play()
			--	tween(torso, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {C0 = newcf(0,0,0)*makecforientation(0, 0, 0)}):Play()
			--	tween(head, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {C0 = newcf(0, 1.5, 0)*makecforientation(0, 0, 0)}):Play()
			
			wait(0.75)
			tween(rarm, TweenInfo.new(0.75, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {C0 = newcf(3.043, -3.97, -1.882)*makecforientation(-4.703, 81.715, 84.3)}):Play()
			tween(larm, TweenInfo.new(0.75, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {C0 = newcf(-3.043, -3.97, -1.882)*makecforientation(-4.703, -81.715, -84.3)}):Play()
wait(0.65)
if not charging then
			tween(rarm, TweenInfo.new(1, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(2.04, -2.859, -2.378)*makecforientation(11.783, -176.243, 139.519)}):Play()
			tween(larm, TweenInfo.new(1, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(-2.108, -2.35, -2.473)*makecforientation(15, 176.068, -135.791)}):Play()
			end
	elseif what == "shove" then
			tween(rarm, TweenInfo.new(0.05, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {C0 = newcf(1.473, -1.611, 1.062)*makecforientation(20, 90, 90)}):Play()
			tween(larm, TweenInfo.new(0.05, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {C0 = newcf(-1.473, -1.611, 1.062)*makecforientation(20, -90, -90)}):Play()
	--	tween(torso, TweenInfo.new(0.3, Enum.EasingStyle.Elastic, Enum.EasingDirection.Out), {C0 = newcf(0,0,0)*makecforientation(-10, 0, 0)}):Play()
	--	tween(head, TweenInfo.new(0.3, Enum.EasingStyle.Elastic, Enum.EasingDirection.Out), {C0 = newcf(0, 1.483, 0.098)*makecforientation(10, 0, 0)}):Play()

		wait(0.05)

			tween(rarm, TweenInfo.new(0.2, Enum.EasingStyle.Elastic, Enum.EasingDirection.Out), {C0 = newcf(1.386, -1.237, -1.79)*makecforientation(-4.778, 95.348, 92.77)}):Play()
			tween(larm, TweenInfo.new(0.2, Enum.EasingStyle.Elastic, Enum.EasingDirection.Out), {C0 = newcf(-1.386, -1.237, -1.79)*makecforientation(-4.778, -95.348, -92.77)}):Play()
	--	tween(torso, TweenInfo.new(0.75, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(0,0,0)*makecforientation(0, 0, 0)}):Play()
	--	tween(head, TweenInfo.new(0.75, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(0, 1.5, 0)*makecforientation(0, 0, 0)}):Play()
	
	wait(0.1)
	
			tween(rarm, TweenInfo.new(0.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {C0 = newcf(1.221, -1.289, -1.197)*makecforientation(1.443, 75.701, 94.23)}):Play()
			tween(larm, TweenInfo.new(0.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {C0 = newcf(-1.221, -1.289, -1.197)*makecforientation(1.443, -75.701, -94.23)}):Play()
	
	wait(0.15)
	
			tween(rarm, TweenInfo.new(0.8, Enum.EasingStyle.Back, Enum.EasingDirection.InOut), {C0 = newcf(2.04, -2.859, -2.378)*makecforientation(11.783, -176.243, 139.519)}):Play()
			tween(larm, TweenInfo.new(0.8, Enum.EasingStyle.Back, Enum.EasingDirection.InOut), {C0 = newcf(-2.108, -2.35, -2.473)*makecforientation(15, 176.068, -135.791)}):Play()
			
	elseif what == "inspect" then -- how would i stop the inspect animation after doing certain actions like blocking, charging, attacking and shoving?
		
			local instween1 = tween(rarm, TweenInfo.new(1, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(1.375, -1.379, -2.854)*makecforientation(21.266, -111.793, -166.997)})
			local instween2 = tween(larm, TweenInfo.new(1, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(-1.418, -1.4, -2.941)*makecforientation(21.266, 111.793, 166.997)})
			local instween3 = tween(rarm, TweenInfo.new(0.8, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(1.375, -1.379, -2.854)*makecforientation(-13.259, 98.633, 153.264)})
			local instween4 = tween(larm, TweenInfo.new(0.8, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(-1.375, -1.379, -2.854)*makecforientation(-13.259, -98.633, -153.264)})
			local instween5 = tween(rarm, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {C0 = newcf(3.281, -1.956, -2.945)*makecforientation(19.466, -172.829, -158.449)})
			local instween6 = tween(larm, TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {C0 = newcf(-3.281, -1.956, -2.945)*makecforientation(19.466, 172.829, 158.449)})
			local instween7 = tween(rarm, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {C0 = newcf(0.846, -2.132, -3.123)*makecforientation(20.812, -173.889, 156.776)})
			local instween8 = tween(larm, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {C0 = newcf(-1.041, -2.066, -3.094)*makecforientation(17.406, -176.157, -158.509)})
			local instween9 = tween(rarm, TweenInfo.new(1, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(2.04, -2.859, -2.378)*makecforientation(11.783, -176.243, 139.519)})
			local instween10 = tween(larm, TweenInfo.new(1, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {C0 = newcf(-2.108, -2.35, -2.473)*makecforientation(15, 176.068, -135.791)})
			

			table.insert(inspectanimtweens, instween1)
			table.insert(inspectanimtweens, instween2)
				table.insert(inspectanimtweens, instween3)
				table.insert(inspectanimtweens, instween4)
				table.insert(inspectanimtweens, instween5)
				table.insert(inspectanimtweens, instween6)
				table.insert(inspectanimtweens, instween7)
				table.insert(inspectanimtweens, instween7)
				table.insert(inspectanimtweens, instween8)
				table.insert(inspectanimtweens, instween9)
				table.insert(inspectanimtweens, instween10)

			
			if table.find(inspectanimtweens, instween1) then
				inspectanimtweens[table.find(inspectanimtweens, instween1)]:Play()
			end
			if table.find(inspectanimtweens, instween2) then
				inspectanimtweens[table.find(inspectanimtweens, instween2)]:Play()
			end
			wait(3)

			if table.find(inspectanimtweens, instween4) then
				inspectanimtweens[table.find(inspectanimtweens, instween4)]:Play()
			end
			if table.find(inspectanimtweens, instween3) then
				inspectanimtweens[table.find(inspectanimtweens, instween3)]:Play()
			end


			
			wait(3)

			if table.find(inspectanimtweens, instween5) then
				inspectanimtweens[table.find(inspectanimtweens, instween5)]:Play()
			end
			if table.find(inspectanimtweens, instween6) then
				inspectanimtweens[table.find(inspectanimtweens, instween6)]:Play()
			end
			
			wait(0.3)
			if table.find(inspectanimtweens, instween7) then
				inspectanimtweens[table.find(inspectanimtweens, instween7)]:Play()
			end
			if table.find(inspectanimtweens, instween8) then
				inspectanimtweens[table.find(inspectanimtweens, instween8)]:Play()
			end

			
			wait(0.45)
			
			if table.find(inspectanimtweens, instween9) then
				inspectanimtweens[table.find(inspectanimtweens, instween9)]:Play()
			end
			if table.find(inspectanimtweens, instween10) then
				inspectanimtweens[table.find(inspectanimtweens, instween10)]:Play()
			end
			for i,v in pairs(inspectanimtweens) do
				table.remove(inspectanimtweens, i)

				--v:Cancel()
				--v:Destroy()
				--	v:Cancel()
			end
	end
end)
end