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: Help with animation script

Previous Thread :: Next Thread 
iiFuzzyBear is not online. iiFuzzyBear
Joined: 24 Jan 2013
Total Posts: 116
20 Dec 2016 06:21 AM
Doesnt work in servers only works in studio. This is a script inside a npc

Idle = "http://www.roblox.com/asset/?id=180435571"

Humanoid = script.Parent.Humanoid
Animation = Instance.new("Animation")
Animation.Parent = script.Parent
Animation.AnimationId = Idle

local load = Humanoid:LoadAnimation(Animation)
load:Play()
Report Abuse
KillerKyle is not online. KillerKyle
Joined: 29 Jul 2007
Total Posts: 6371
20 Dec 2016 06:55 AM
What script is it in?

Do you have Filtering Enabled?
Report Abuse
iiFuzzyBear is not online. iiFuzzyBear
Joined: 24 Jan 2013
Total Posts: 116
20 Dec 2016 11:37 AM
@above

It's a normal script in the npc model

And FE is enabled
Report Abuse
dukeispie is online. dukeispie
Joined: 20 Jun 2013
Total Posts: 467
20 Dec 2016 11:43 AM
Unless you wanna learn remote events, turn off Filter Enabled, that might be the problem.


Report Abuse
iiFuzzyBear is not online. iiFuzzyBear
Joined: 24 Jan 2013
Total Posts: 116
20 Dec 2016 11:56 AM
@duk

Whats the difference between remote and this script? (Im on mobile rn in class so cant rly check )
Report Abuse
KillerKyle is not online. KillerKyle
Joined: 29 Jul 2007
Total Posts: 6371
20 Dec 2016 11:56 AM
I'm think you need to use a local script on animations.
Report Abuse
BrickBuilder58 is not online. BrickBuilder58
Joined: 21 Nov 2011
Total Posts: 521
20 Dec 2016 12:25 PM
You must use a local script. Because there is no parent I think.
e.g on wiki - local animTrack = Humanoid:LoadAnimation(animation)

Make sure to have the script in correct punctuation for the some of your words. But you said it does work on studio which makes me believe it must be a local script.

Report Abuse
iiFuzzyBear is not online. iiFuzzyBear
Joined: 24 Jan 2013
Total Posts: 116
20 Dec 2016 02:18 PM
@killer
Thats actually what i thought too but that broke the script in studio test and servers so idk
Report Abuse
iiFuzzyBear is not online. iiFuzzyBear
Joined: 24 Jan 2013
Total Posts: 116
20 Dec 2016 02:29 PM
@brick

doesn't work

I actually have no clue wtf to do anymore
Report Abuse
iiFuzzyBear is not online. iiFuzzyBear
Joined: 24 Jan 2013
Total Posts: 116
20 Dec 2016 02:34 PM
the script works without FE but once FE is enabled it breaks
Report Abuse
KillerKyle is not online. KillerKyle
Joined: 29 Jul 2007
Total Posts: 6371
20 Dec 2016 03:11 PM
The script is NOT a local script, correct?
Report Abuse
iiFuzzyBear is not online. iiFuzzyBear
Joined: 24 Jan 2013
Total Posts: 116
20 Dec 2016 03:27 PM
correct

I'm currently attempting to use the wiki to help me and it's really not xd

http://wiki.roblox.com/index.php?title=Animations#Playing_Animation_in_Non-Player_Character

heres my script so far in serverscriptservice:



local id = "http://www.roblox.com/asset/?id=180435571"
local char = game.Workspace:WaitForChild("Char1")



animation = Instance.new("Animation")
animation.Parent = char
animation.AnimationId = id



local animController = Instance.new("AnimationController")
animController.Parent = char

local animTrack = animController:LoadAnimation(animation)

animTrack:Play()





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