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 » Scripting Helpers
Home Search
 

Re: Animation Trouble

Previous Thread :: Next Thread 
gogoboots1 is not online. gogoboots1
Joined: 13 Jun 2009
Total Posts: 65
03 Jan 2013 07:40 AM
I am trying to animate a shield bash for a tool I have, but how do I insert this into the tool? I have the animation done, but cannot utilize it I tried the animate (play) tool, but that didn't work. Please help.
Report Abuse
Robertoman is not online. Robertoman
Joined: 10 May 2007
Total Posts: 6369
03 Jan 2013 07:41 AM
Your forum post doesn't give enough information for anyone to help you.
Report Abuse
gogoboots1 is not online. gogoboots1
Joined: 13 Jun 2009
Total Posts: 65
03 Jan 2013 08:00 AM
How do I script an animation to play when click a button? And where do I put the script inside of a tool so that it will play with the tool in hand?
Report Abuse
Robertoman is not online. Robertoman
Joined: 10 May 2007
Total Posts: 6369
03 Jan 2013 08:12 AM
Okay so firstly, what do you mean by "click a button", and secondly, the sound should be put in a place that is easily accessible like in the tool itself as the script can then call on the sound. As for the button you click, I'm not sure exactly what you mean, but I think you mean a button on your keyboard after you pull the weapon out. If you mean pressing a button on your keyboard it goes like this:

script.Parent.Equipped:connect(function(m)
m.KeyDown:connect(function(k)
if k=='k'then
script.Parent.ANIMATION:Play()
end
end)
end)
Report Abuse
gogoboots1 is not online. gogoboots1
Joined: 13 Jun 2009
Total Posts: 65
03 Jan 2013 08:20 AM
Okay thanks, do I just put the script above in the sword script? Or seperate?
Report Abuse
SmoothBlockModel is online. SmoothBlockModel
Joined: 26 Sep 2008
Total Posts: 2155
03 Jan 2013 08:24 AM
You could do

function WhateverShieldDoes()
--Coding for Shield
end

script.Parent.Equipped:connect(function(m)
m.KeyDown:connect(function(k)
if k=='k'then
WhateverShieldDoes()
script.Parent.ANIMATION:Play()
end
end)
end)
Report Abuse
Robertoman is not online. Robertoman
Joined: 10 May 2007
Total Posts: 6369
03 Jan 2013 08:31 AM
The sword and shield are both being worn? If this is the case, how is the shield being equipped to their arm when tools automatically equip to only one arm?
Report Abuse
Robertoman is not online. Robertoman
Joined: 10 May 2007
Total Posts: 6369
03 Jan 2013 08:31 AM
My point is... the shield is technically not a tool then.
Report Abuse
gogoboots1 is not online. gogoboots1
Joined: 13 Jun 2009
Total Posts: 65
03 Jan 2013 09:48 AM
The shield and sword are both together in the tool similar to the spartan sword and shield.
Report Abuse
gogoboots1 is not online. gogoboots1
Joined: 13 Jun 2009
Total Posts: 65
03 Jan 2013 09:48 AM
Gear item
Report Abuse
Robertoman is not online. Robertoman
Joined: 10 May 2007
Total Posts: 6369
03 Jan 2013 09:49 AM
I've never used it, so I'm not familiar with it's hierarchy. That means I can't help with a script, but I the idea of how to play the animation is the same I'm sure.
Report Abuse
gogoboots1 is not online. gogoboots1
Joined: 13 Jun 2009
Total Posts: 65
03 Jan 2013 09:53 AM
Okay. The shield is just welded to the arm and I animated it so that the shield arm moves. That will move anything welded to it (i.e the shield). Right?
Report Abuse
Robertoman is not online. Robertoman
Joined: 10 May 2007
Total Posts: 6369
03 Jan 2013 09:54 AM
Yes, if a block is welded to another block, and one of them moves, the other will move with it.
Report Abuse
gogoboots1 is not online. gogoboots1
Joined: 13 Jun 2009
Total Posts: 65
03 Jan 2013 09:57 AM
Okay and I just put the script in separately.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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