Animation does not play second time

Hi im making a FPS game and there is a equip animation
however, first time it works, but after I reset it doens’t (it is in StarterCharacterScripts)

heres a video of what im talking about:

it might still be proccessing i just uploaded it
srry i cant upload it directly

all the other animations work however (hold, reload, fire)

code: (the part where it plays)

	local EquipAnim = Instance.new('Animation',GunModel)
	EquipAnim.AnimationId = GunModule.Animations.Equip

	EquipAnim.Name = 'EquipAnimation'

	Viewmodel.Humanoid:LoadAnimation(EquipAnim):Play()
	
	local snd = rstor.GunSounds[ActiveWeapon].Equip:Clone()
	snd.Parent = GunModel.Handle
	snd:Play()

	game.Debris:AddItem(snd,GunModule.EquipTime)

	
	task.wait(GunModule.EquipTime)
	
	local HoldAnim = Instance.new('Animation',GunModel)
	HoldAnim.AnimationId = GunModule.Animations.Hold
	HoldAnim.Name = 'HoldAnimation'
	
	Viewmodel.Humanoid:LoadAnimation(HoldAnim):Play()

my hold anim is core and my equip is action
after resetting equip anim doesnt work, but my hold still works
WHAT

help pls

1 Like

nvm fixed it

turns out I had a task.wait at the end and it somehow stopped the animation
got rid of it

1 Like

why would I want that? its an equip animation

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.