I am making a combat script, I added my own punching animations and they do not play, yet, I receive no error message in output, I would like to know how to fix this.

Extra Details

  • I have multiple "getting hit" animations that play when a user gets hit, those work on the dummy.
  • I do damage
  • I added "print("p1")" and so-on to see if something wasn't being read however the print statements work correctly

Here is some code specifically for the animation:

if combo == 1 then
		local leftpunch = Humanoid:LoadAnimation(script.leftpunch):Play()
	    print ("p1")

Here is a pastebin to my entire script: https://pastebin.com/vdJNknJc Here is an image of my workspace: https://pasteboard.co/JeNUksB.png

2 comments

0

In the future, it is a lot easier for you to put your whole script here instead of pastebin.

0

In your script, you are looping through all the children in the workspace, are you sure that the loop has finished before getting to that if statement?