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: Object must be in Workspace before loading animation.

Previous Thread :: Next Thread 
ZeroRGB is not online. 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 is not online. 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 is not online. 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
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