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: Dual Tool.

Previous Thread :: Next Thread 
jaxxcoolboy is not online. jaxxcoolboy
Joined: 26 Nov 2013
Total Posts: 192
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
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
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 is not online. 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
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
18 Sep 2016 07:57 PM
http://wiki.roblox.com/index.php?title=Animations
Report Abuse
jaxxcoolboy is not online. jaxxcoolboy
Joined: 26 Nov 2013
Total Posts: 192
18 Sep 2016 08:01 PM
@vivivio Does not work sorry.
Report Abuse
vivivio is not online. 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 is not online. 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
jaxxcoolboy is not online. jaxxcoolboy
Joined: 26 Nov 2013
Total Posts: 192
18 Sep 2016 08:05 PM
^ Nope.
Report Abuse
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
18 Sep 2016 08:06 PM
http://wiki.roblox.com/index.php?title=Animations [2]
second attempt at using reason here
Report Abuse
vivivio is not online. 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
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