when playing one animation and then playing the next animation it seems to make my npc stand up straight for half a second and then it plays the next animation, how do i remove this effect?
local part = script.Parent.Parent.Designated
local animation = script.Animation
local anim2 = script.Anim2
local anim3 = script.anim3
local humanoid = script.Parent.Humanoid
local animationTrack = humanoid:LoadAnimation(animation)
local anim2Track = humanoid:LoadAnimation(anim2)
local anim3Track = humanoid:LoadAnimation(anim3)
local function playNext()
print("Animation stopped and playing Anim2")
anim2Track:Play()
wait(anim2Track.Length)
anim2Track:Stop()
print("Anim2 stopped and playing Anim3")
anim3Track:Play()
end
-- Play the first animation
animationTrack:Play()
local function onTouched(other)
local character = other.Parent
local humanoid = character:FindFirstChildWhichIsA("Humanoid")
-- If touched by a player's humanoid, stop the animation and play Anim2
if humanoid then
animationTrack:Stop()
playNext()
end
end
part.Touched:Connect(onTouched)
** You are now Level 3! **

