ZeroRGB
|
  |
| Joined: 23 Mar 2016 |
| Total Posts: 8 |
|
|
| 18 Apr 2016 06:23 PM |
Object must be in Workspace before loading animation.
How the heck do I get around this? Thats all the error says e-e
|
|
|
| Report Abuse |
|
|
eRanged
|
  |
| Joined: 15 Jun 2013 |
| Total Posts: 9746 |
|
|
| 18 Apr 2016 06:29 PM |
From my experience
This is what causes it.
Humanoid:LoadAnimation(animation) <-- something like that
How I fixed:
Cloning the animation and local script that's loading it into a CharacterAdded script. Put animation in humanoid and put script (disabled) into backpack
Then before you turn disable off for the local script. Repeat wait() until Character:FindFirstChild("Humanoid") and Character:FindFirstChild("Humanoid"):FindFirstChild("Animation") |
|
|
| Report Abuse |
|
|
eRanged
|
  |
| Joined: 15 Jun 2013 |
| Total Posts: 9746 |
|
|
| 18 Apr 2016 06:32 PM |
This is my code,
local Animation = script:WaitForChild("Animation") local AnimScript = script:WaitForChild("Script")
game.Players.PlayerAdded:connect(function(p) p.CharacterAdded:connect(function(c) local Animation = Animation:Clone() Animation.Parent = c:WaitForChild("Humanoid") local AnimScript = AnimScript:Clone() AnimScript.Parent = p:WaitForChild("Backpack") repeat wait() until c:FindFirstChild('Humanoid') and c:FindFirstChild('Humanoid'):FindFirstChild('Animation') AnimScript.Disabled = false
|
|
|
| Report Abuse |
|
|