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
 

Need help coding this localscript please!

Previous Thread :: Next Thread 
kamontae123 is not online. kamontae123
Joined: 02 Apr 2008
Total Posts: 136
24 Nov 2014 01:38 PM
Sup, When you left click it will play the first animation and if you left click again before 0.5 seconds it will play the second animation like I want it too. How can I get this script to play the third and fourth animations like I have it for the first two animations?

I messed around with it and the 'return' helps me for the first and second animations but it will only play the first animation after the second animation instead of the third animation then the fourth like I want it.




local animation = Instance.new("Animation")

animation.AnimationId = "rbxassetid://188046705" --BATK1


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

local character = Player.Character

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

animTrack:Play()
wait(0.5)
animTrack:Stop()
wait(5)
return


end)

if animation.AnimationId ~= nil then

local animationSecond = Instance.new("Animation")

animationSecond.AnimationId = "rbxassetid://188253235" --BATK2

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

local character = Player.Character

animTrack = character:WaitForChild("Humanoid"):LoadAnimation(animationSecond)
animTrack:Play()
wait(0.1)
animTrack:Stop()
wait(5)

end)
end

if animation.AnimationId ~= nil then

local animationThird = Instance.new("Animation")

animationThird.AnimationId = "rbxassetid://188259240" --BATK3

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

local character = Player.Character

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

animTrack:Play()
wait(0.1)
animTrack:Stop()
wait(5)

end)
end

if animation.AnimationId ~= nil then

local animationFourth = Instance.new("Animation")

animationFourth.AnimationId = "rbxassetid://188260074" --BATK4

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

local character = Player.Character

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

animTrack:Play()
wait(0.1)
animTrack:Stop()
wait(5)

end)
end
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