generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Enemy Animation not working

Previous Thread :: Next Thread 
Fangous is not online. Fangous
Joined: 03 Jul 2010
Total Posts: 4448
16 Jun 2016 01:00 PM
repeat wait() until script.Parent.Enemy

local playerCharacter = script.Parent.Enemy

local playerAnimation = Instance.new("Animation")

playerAnimation.AnimationId = "http://www.roblox.com/asset/?id=434867122"

local loadAnimation = playerCharacter:LoadAnimation(playerAnimation)

loadAnimation:Play()


What it should do:
Punch animation

What it actually does:
walking in place
Report Abuse
unwarranted is not online. unwarranted
Joined: 05 Jun 2009
Total Posts: 1087
16 Jun 2016 01:04 PM
http://wiki.roblox.com/index.php?title=API:Class/AnimationController
are you using an animationcontroller in the npc? (if it is a npc)


mom wheres the spaghetti
Report Abuse
Fangous is not online. Fangous
Joined: 03 Jul 2010
Total Posts: 4448
16 Jun 2016 01:05 PM
between u and me i didnt know that existed

ill see if i can take it from here
Report Abuse
Fangous is not online. Fangous
Joined: 03 Jul 2010
Total Posts: 4448
16 Jun 2016 01:11 PM
What I have now:

local playerCharacter = script.Parent.Enemy

local playerAnimation = Instance.new("AnimationController")

playerAnimation.AnimationId = "http://www.roblox.com/asset/?id=434867122"

local loadAnimation = playerCharacter:LoadAnimation(playerAnimation)

loadAnimation:Play()


It says AnimationId is not a valid member of AnimationController
How do I use it?
Report Abuse
unwarranted is not online. unwarranted
Joined: 05 Jun 2009
Total Posts: 1087
16 Jun 2016 01:15 PM
http://wiki.roblox.com/index.php?title=Animations

local animController = Instance.new("AnimationController")
local animTrack = animController:LoadAnimation(animation)
animTrack:Play()


mom wheres the spaghetti
Report Abuse
Fangous is not online. Fangous
Joined: 03 Jul 2010
Total Posts: 4448
16 Jun 2016 01:19 PM
thx
Report Abuse
Fangous is not online. Fangous
Joined: 03 Jul 2010
Total Posts: 4448
16 Jun 2016 01:25 PM
local animController = Instance.new("AnimationController")

local animation = Instance.new("Animation")
animation.AnimationId = "http://www.roblox.com/asset/?id=434867122"

local animTrack = animController:LoadAnimation(animation)
animTrack:Play()



Error:
14:25:06.074 - Object must be in Workspace before loading animation.
Report Abuse
unwarranted is not online. unwarranted
Joined: 05 Jun 2009
Total Posts: 1087
16 Jun 2016 01:26 PM
local animation = Instance.new("Animation")
i think you have to parent it to something for it to work, but idk.


mom wheres the spaghetti
Report Abuse
Fangous is not online. Fangous
Joined: 03 Jul 2010
Total Posts: 4448
16 Jun 2016 01:27 PM
should i just parent it to Enemy?
Report Abuse
unwarranted is not online. unwarranted
Joined: 05 Jun 2009
Total Posts: 1087
16 Jun 2016 01:28 PM
what i like to do is organize everything and put my animations in a folder, but anywhere will work so do what suits you


mom wheres the spaghetti
Report Abuse
Fangous is not online. Fangous
Joined: 03 Jul 2010
Total Posts: 4448
16 Jun 2016 01:30 PM
This is what I have now:

local animController = Instance.new("AnimationController")
animController.Parent = script.Parent.Enemy
local animation = Instance.new("Animation")
animation.Parent = animController
animation.AnimationId = "http://www.roblox.com/asset/?id=434867122"
local animTrack = animController:LoadAnimation(animation)
animTrack:Play()

No errors but he still just walks in place.
Report Abuse
unwarranted is not online. unwarranted
Joined: 05 Jun 2009
Total Posts: 1087
16 Jun 2016 01:32 PM
is the animation priority above the walking animation priority?


mom wheres the spaghetti
Report Abuse
Fangous is not online. Fangous
Joined: 03 Jul 2010
Total Posts: 4448
16 Jun 2016 01:33 PM
idk how do i make it a priority?
Report Abuse
unwarranted is not online. unwarranted
Joined: 05 Jun 2009
Total Posts: 1087
16 Jun 2016 01:34 PM
in the animation editor, go to settings or whatever and change the priority to "Action", then save the animation.


mom wheres the spaghetti
Report Abuse
Fangous is not online. Fangous
Joined: 03 Jul 2010
Total Posts: 4448
16 Jun 2016 01:40 PM
still not working :/
Report Abuse
FWCAdvocate is not online. FWCAdvocate
Joined: 22 Nov 2014
Total Posts: 4
16 Jun 2016 02:03 PM
Add me to team create?
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image