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: why won't my animation work?

Previous Thread :: Next Thread 
Bavarium is not online. Bavarium
Joined: 05 May 2011
Total Posts: 12419
15 May 2016 01:50 PM
function onSlash()
local Human = game.Players.LocalPlayer.Character.Humanoid
local animTrack = Human:LoadAnimation('http://www.roblox.com/asset/?id=414952662')
animTrack:Play()

end
script.Parent.Activated:connect(onSlash)

whenever I activate the tool i get this error
14:48:33.944 - Unable to cast value to Object
14:48:33.944 - Script 'Players.Player1.Backpack.Sword.LocalScript', Line 3
14:48:33.945 - Stack End


Report Abuse
KLGA is not online. KLGA
Joined: 19 Apr 2014
Total Posts: 2571
15 May 2016 01:51 PM
When loading an animation, it has to be an animation object, not a string.
Report Abuse
HamilcarMago is not online. HamilcarMago
Joined: 11 Jul 2010
Total Posts: 1094
15 May 2016 01:51 PM
Which one is line 3? Make sure it's Sword.LocalScript you're reading from
Report Abuse
Bavarium is not online. Bavarium
Joined: 05 May 2011
Total Posts: 12419
15 May 2016 01:52 PM
@ham 3rd is the human:loadanimation one
but yeah its in a localscript


Report Abuse
KLGA is not online. KLGA
Joined: 19 Apr 2014
Total Posts: 2571
15 May 2016 01:54 PM
When loading an animation, it has to be an animation object, not a string. [2]
Report Abuse
HamilcarMago is not online. HamilcarMago
Joined: 11 Jul 2010
Total Posts: 1094
15 May 2016 01:58 PM
Anyways, KLGA told you how to solve the problem.
Make an actual animation inside the sword and then load the object not the string.
Report Abuse
Bavarium is not online. Bavarium
Joined: 05 May 2011
Total Posts: 12419
15 May 2016 02:07 PM
thanks klg, it works now :)


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