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: Tryna make an animation play after using another(UNSOLVED)

Previous Thread :: Next Thread 
kamontae123 is not online. kamontae123
Joined: 02 Apr 2008
Total Posts: 136
23 Nov 2014 09:59 AM
I am trying to make an animation attack play after another animation attack using Button1Down. Similar to Roblox's '"ClassicSword", how it has a lunge attack after it's slash from double clicking. May I have some help please?





local animation = Instance.new("Animation")

animation.AnimationId = "rbxassetid://188046705"


game.Players.LocalPlayer:GetMouse''.Button1Down:connect(function()

local character = Player.Character

animTrack = character:WaitForChild("Humanoid"):LoadAnimation(animation)

animTrack:Play()
end)

if animation.AnimationId == nil then

local animation2 = Instance.new("Animation")

animation2.AnimationId = "rbxassetid://188253235"

game.Players.LocalPlayer:GetMouse''.Button1Down:connect(function()

local character = Player.Character

animTrack = character:WaitForChild("Humanoid"):LoadAnimation(animation2)

animTrack:Play()


end)
end
Report Abuse
cxcharlie is not online. cxcharlie
Joined: 26 Aug 2009
Total Posts: 1414
23 Nov 2014 10:11 AM
What's the problem?
Report Abuse
kamontae123 is not online. kamontae123
Joined: 02 Apr 2008
Total Posts: 136
23 Nov 2014 10:18 AM
It doesn't play the new animation after using the first one >.<
Report Abuse
cxcharlie is not online. cxcharlie
Joined: 26 Aug 2009
Total Posts: 1414
23 Nov 2014 04:47 PM
You probably need to call :Stop() on the first one then


U wot m8
Report Abuse
kamontae123 is not online. kamontae123
Joined: 02 Apr 2008
Total Posts: 136
23 Nov 2014 06:10 PM
I tried this it it isn't working.



local animation = Instance.new("Animation")

animation.AnimationId = "rbxassetid://188046705"


game.Players.LocalPlayer:GetMouse''.Button1Down:connect(function()

local character = Player.Character

animTrack = character:WaitForChild("Humanoid"):LoadAnimation(animation)

animTrack:Play()

animTrack:Stop() -- I added Stop() like u said

return -- I added this because it stopped the animation from playing again but still doesn't work :/
end)

if animation.AnimationId == nil then

local animation2 = Instance.new("Animation")

animation2.AnimationId = "rbxassetid://188253235"

game.Players.LocalPlayer:GetMouse''.Button1Down:connect(function()

local character = Player.Character

animTrack = character:WaitForChild("Humanoid"):LoadAnimation(animation2)

animTrack:Play()


end)
end

Report Abuse
cxcharlie is not online. cxcharlie
Joined: 26 Aug 2009
Total Posts: 1414
23 Nov 2014 06:52 PM
If you play something and then stop it right after, no animation would play.. Or did it play?


U wot m8
Report Abuse
kamontae123 is not online. kamontae123
Joined: 02 Apr 2008
Total Posts: 136
23 Nov 2014 07:10 PM
It wont play..
Report Abuse
bno23 is not online. bno23
Joined: 07 Dec 2010
Total Posts: 4
23 Nov 2014 07:30 PM
Players is a nil value.
Report Abuse
bno23 is not online. bno23
Joined: 07 Dec 2010
Total Posts: 4
23 Nov 2014 07:31 PM
Player*
Report Abuse
kamontae123 is not online. kamontae123
Joined: 02 Apr 2008
Total Posts: 136
23 Nov 2014 07:48 PM
Can you explain mate?
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
23 Nov 2014 08:25 PM
u do realize you cant change the title to SOLVED rite


~Master bug finder twitch.tv/ROBLOX/c/4691695 14:08~
Report Abuse
kamontae123 is not online. kamontae123
Joined: 02 Apr 2008
Total Posts: 136
23 Nov 2014 08:47 PM
Its not solved because I still don't have the script working.
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
23 Nov 2014 08:49 PM
but if it is you still cant change it to solved


~Master bug finder twitch.tv/ROBLOX/c/4691695 14:08~
Report Abuse
C0mmando323 is not online. C0mmando323
Joined: 15 Dec 2012
Total Posts: 394
23 Nov 2014 08:57 PM
He's saying you can't change the title
Report Abuse
kamontae123 is not online. kamontae123
Joined: 02 Apr 2008
Total Posts: 136
23 Nov 2014 08:57 PM
u wot m8?
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