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 |
|
|
|
| 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
|
  |
| 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
|
  |
| 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 |
|
|
|
| 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
|
  |
| Joined: 03 Jul 2010 |
| Total Posts: 4448 |
|
| |
|
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 |
|
|
|
| 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
|
  |
| Joined: 03 Jul 2010 |
| Total Posts: 4448 |
|
|
| 16 Jun 2016 01:27 PM |
| should i just parent it to Enemy? |
|
|
| Report Abuse |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 16 Jun 2016 01:32 PM |
is the animation priority above the walking animation priority?
mom wheres the spaghetti |
|
|
| Report Abuse |
|
|
Fangous
|
  |
| Joined: 03 Jul 2010 |
| Total Posts: 4448 |
|
|
| 16 Jun 2016 01:33 PM |
| idk how do i make it a priority? |
|
|
| Report Abuse |
|
|
|
| 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
|
  |
| Joined: 03 Jul 2010 |
| Total Posts: 4448 |
|
| |
|
| |
|