|
| 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
|
  |
| Joined: 26 Aug 2009 |
| Total Posts: 1414 |
|
| |
|
|
| 23 Nov 2014 10:18 AM |
| It doesn't play the new animation after using the first one >.< |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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
|
  |
| 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 |
|
|
| |
|
bno23
|
  |
| Joined: 07 Dec 2010 |
| Total Posts: 4 |
|
| |
|
bno23
|
  |
| Joined: 07 Dec 2010 |
| Total Posts: 4 |
|
| |
|
| |
|
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 |
|
|
|
| 23 Nov 2014 08:47 PM |
| Its not solved because I still don't have the script working. |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 23 Nov 2014 08:57 PM |
| He's saying you can't change the title |
|
|
| Report Abuse |
|
|
| |
|