|
| 13 Apr 2016 06:18 PM |
while true do local animController = Instance.new("AnimationController") local animTrack = animController:LoadAnimation("http://www.roblox.com/asset/?id=251452633") animTrack:Play() wait(5) end
The output says 'Unable to cast value to Object' on line 3. This is a server script inside of a player, I made the loop so I could see if it was working or not |
|
|
| Report Abuse |
|
|
|
| 13 Apr 2016 06:20 PM |
| You need to give it an Animation object, not a link to an asset |
|
|
| Report Abuse |
|
|
|
| 13 Apr 2016 07:16 PM |
while true do local animation = Instance.new("Animation") animation.AnimationId = "http://www.roblox.com/Asset?ID=251452633" local animController = Instance.new("AnimationController") local animTrack = animController:LoadAnimation(animation) animTrack:Play() wait(1) end
Now it displays the error 'Object must be in Workspace before loading animation.' WHAT |
|
|
| Report Abuse |
|
|
|
| 13 Apr 2016 08:11 PM |
| The error is self-explanitory. Also it's a bad idea to keep creating them, just create it outside the loop and play it inside the loop |
|
|
| Report Abuse |
|
|
| |
|