Vemeric
|
  |
| Joined: 05 Dec 2012 |
| Total Posts: 462 |
|
|
| 15 Sep 2016 12:59 PM |
So I want this animation to be deleted from ANOTHER script. But I can't really figure out how.
character = Player.Character local humanoid = character:FindFirstChild("Humanoid") character.Humanoid.WalkSpeed = 6 animation = Instance.new("Animation", character) animation.AnimationId = script.RightPunchCharge.Animation.Value loadedAnimation = humanoid:LoadAnimation(animation) animation.Name = "ChargePunch" loadedAnimation:Play()
other script: if game.Players.LocalPlayer.Character:FindFirstChild("ChargePunch") then game.Players.LocalPlayer.Character.ChargePunch:remove() end
|
|
|
| Report Abuse |
|
|
|
| 15 Sep 2016 01:01 PM |
| to remove a loaded anim you have to remove it from where it was loaded or get playing anims and stop them |
|
|
| Report Abuse |
|
|
Vemeric
|
  |
| Joined: 05 Dec 2012 |
| Total Posts: 462 |
|
|
| 15 Sep 2016 01:17 PM |
Right it's loaded in the humanoid. what do I do?
|
|
|
| Report Abuse |
|
|
|
| 15 Sep 2016 01:20 PM |
print(animationtrack.Parent) remove it from that parent or parent it to the character if nil |
|
|
| Report Abuse |
|
|
Vemeric
|
  |
| Joined: 05 Dec 2012 |
| Total Posts: 462 |
|
|
| 17 Sep 2016 07:58 AM |
it's nil, I parented it to the character and nothing happened. The animation didnt stop.
|
|
|
| Report Abuse |
|
|