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
 

Animation

Previous Thread :: Next Thread 
millymanks is not online. millymanks
Joined: 26 Jun 2014
Total Posts: 413
18 Jul 2015 11:44 AM
This is a local script inside a gui button and when you click it, it runs an animation. When i click it, my character doesn't do anything.

plr=game.Players.LocalPlayer
char=plr.Character
script.Parent.MouseButton1Click:connect(function()
local anim=char.Humanoid:LoadAnimation(script.Animation)
anim:Play()
end)
Report Abuse
millymanks is not online. millymanks
Joined: 26 Jun 2014
Total Posts: 413
18 Jul 2015 11:46 AM
The output says nothing.
Report Abuse
ShungTzu is not online. ShungTzu
Joined: 14 Jun 2014
Total Posts: 959
18 Jul 2015 11:50 AM
In a LocalScript, in StarterGui, put:

plr=game.Players.LocalPlayer
char=player.Character or player.CharacterAdded:wait()
human=char:WaitForChild('Humanoid')
anim=char.Humanoid:LoadAnimation(script.Animation)

ThatButton.MouseButton1Click:connect(function()
anim:Play()
end)
Report Abuse
ShungTzu is not online. ShungTzu
Joined: 14 Jun 2014
Total Posts: 959
18 Jul 2015 11:52 AM
player should be your "plr", I'm just used to typing it that way.
Report Abuse
millymanks is not online. millymanks
Joined: 26 Jun 2014
Total Posts: 413
18 Jul 2015 11:52 AM
^ Didn't work
Report Abuse
ShungTzu is not online. ShungTzu
Joined: 14 Jun 2014
Total Posts: 959
18 Jul 2015 11:53 AM
I've done it hundreds of times. It always works.
Report Abuse
millymanks is not online. millymanks
Joined: 26 Jun 2014
Total Posts: 413
18 Jul 2015 11:53 AM
Is it my animation?
Report Abuse
ShungTzu is not online. ShungTzu
Joined: 14 Jun 2014
Total Posts: 959
18 Jul 2015 11:55 AM
You didn't actually leave the literal "ThatButton" in there, did you? The animation is in the script, right?
Report Abuse
ShungTzu is not online. ShungTzu
Joined: 14 Jun 2014
Total Posts: 959
18 Jul 2015 11:56 AM
Is it an animation you created on that same profile?
Report Abuse
millymanks is not online. millymanks
Joined: 26 Jun 2014
Total Posts: 413
18 Jul 2015 11:57 AM
Yes, and i did "script.Parent" instead of "ThatButton"
Report Abuse
millymanks is not online. millymanks
Joined: 26 Jun 2014
Total Posts: 413
18 Jul 2015 12:00 PM
Im going to look on the wiki
Report Abuse
millymanks is not online. millymanks
Joined: 26 Jun 2014
Total Posts: 413
18 Jul 2015 12:14 PM
Wtf not even the wiki example works.
Report Abuse
ShungTzu is not online. ShungTzu
Joined: 14 Jun 2014
Total Posts: 959
18 Jul 2015 12:29 PM
Have you ever seen that animation play?
Report Abuse
millymanks is not online. millymanks
Joined: 26 Jun 2014
Total Posts: 413
18 Jul 2015 06:26 PM
Yes, in the editor.
Report Abuse
ShungTzu is not online. ShungTzu
Joined: 14 Jun 2014
Total Posts: 959
18 Jul 2015 06:46 PM
Check the url in the Animation.

Change

anim=char.Humanoid:LoadAnimation(script.Animation)

to

anim=human:LoadAnimation(script.Animation)--just in case

.


Import the Animation into the Editor and make sure it's it.


Print the result of every line to make sure it's happening.


After that, I don't know. I'd have to be there.
Report Abuse
millymanks is not online. millymanks
Joined: 26 Jun 2014
Total Posts: 413
19 Jul 2015 10:05 AM
Sometimes it doesn't even fire when the button is clicked. Is it because i have a gui behind it with the same Zindex?
Report Abuse
ShungTzu is not online. ShungTzu
Joined: 14 Jun 2014
Total Posts: 959
19 Jul 2015 12:19 PM
Not if that's the case.
Report Abuse
Whoami102 is not online. Whoami102
Joined: 25 Jul 2013
Total Posts: 131
19 Jul 2015 12:34 PM
Put the animation in the gui! Don't put it in the script! Things like sounds a animations don't work inside the executioner!
Report Abuse
ShungTzu is not online. ShungTzu
Joined: 14 Jun 2014
Total Posts: 959
19 Jul 2015 12:48 PM
Mine don't seem to know that rule. They always play anyway.
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