|
| 18 Sep 2016 07:54 PM |
| Hello there. I have just made an animation where you can wave 2 glowsticks. But how do you activate the animation when you select the tool? |
|
|
| Report Abuse |
|
|
|
| 18 Sep 2016 07:56 PM |
1) use the tool.Equipped event 2) create an animation with that ID 3) load it onto humanoid 4) use the Play function on it |
|
|
| Report Abuse |
|
|
vivivio
|
  |
| Joined: 23 Jan 2012 |
| Total Posts: 707 |
|
|
| 18 Sep 2016 07:57 PM |
local Tool = script.Parent Tool.Equipped:connect(function() local Animation = ?? Animation:Play() end)
|
|
|
| Report Abuse |
|
|
|
| 18 Sep 2016 07:57 PM |
| http://wiki.roblox.com/index.php?title=Animations |
|
|
| Report Abuse |
|
|
|
| 18 Sep 2016 08:01 PM |
| @vivivio Does not work sorry. |
|
|
| Report Abuse |
|
|
vivivio
|
  |
| Joined: 23 Jan 2012 |
| Total Posts: 707 |
|
|
| 18 Sep 2016 08:02 PM |
local Tool = script.Parent Tool.Equipped:connect(function() local Humanoid = script.Parent.Parent:FindFirstChild("Humanoid") if Humanoid ~= nil then local animTrack = Humanoid:LoadAnimation(script.Parent["Animation_Name_Here"]) animTrack:Play() end end)
right code here |
|
|
| Report Abuse |
|
|
vivivio
|
  |
| Joined: 23 Jan 2012 |
| Total Posts: 707 |
|
|
| 18 Sep 2016 08:04 PM |
| Put a local script in the tool with this code and the animation with the same name in the code parented to the tool as well |
|
|
| Report Abuse |
|
|
| |
|
|
| 18 Sep 2016 08:06 PM |
http://wiki.roblox.com/index.php?title=Animations [2] second attempt at using reason here |
|
|
| Report Abuse |
|
|
vivivio
|
  |
| Joined: 23 Jan 2012 |
| Total Posts: 707 |
|
|
| 18 Sep 2016 08:07 PM |
http://wiki.roblox.com/index.php?title=Animations [3]
:/ |
|
|
| Report Abuse |
|
|