sillytrew
|
  |
| Joined: 08 Jul 2012 |
| Total Posts: 54 |
|
|
| 11 Jun 2017 09:25 PM |
I have a script that is supposed to take a copy of an animate script with wounded animations and put it in StarterCharacterScripts but It doesn't.
Script:local animate = game.ServerStorage.Animate local characterhum = script.Parent.Humanoid
if characterhum.Health == 50 then animate.Parent = script.Parent end
P.S the script is located in StarterCharacterScripts
Thanks in advance! |
|
|
| Report Abuse |
|
|
|
| 11 Jun 2017 09:34 PM |
The way to play an animation is much different than this.
local animate = script.Parent.Animations.Animate -- It's good to put a folder in StarterCharacterScripts called Animations or something like that to store all of your animations.
To play the animation, you first have to load the animation into the humanoid.
local loadedAnimation = script.Parent.Humanoid:LoadAnimation(animate)
while wait(1) do if script.Parent.Humanoid.Health <= 50 then loadedAnimation:Play() end end
|
|
|
| Report Abuse |
|
|
sillytrew
|
  |
| Joined: 08 Jul 2012 |
| Total Posts: 54 |
|
|
| 11 Jun 2017 09:51 PM |
Thank you but I have a wounded walk animation and idle animation and I don't know how to play those. |
|
|
| Report Abuse |
|
|
Arawnio
|
  |
| Joined: 04 Sep 2014 |
| Total Posts: 85 |
|
|
| 11 Jun 2017 10:34 PM |
You need to upload animations for using servers.
|
|
|
| Report Abuse |
|
|
sillytrew
|
  |
| Joined: 08 Jul 2012 |
| Total Posts: 54 |
|
| |
|