|
| 29 Dec 2014 02:40 AM |
| Okay, so I already know how to make an animation,(which is really pretty simple so I feel stupid saying that as though it means something), but How would I go about putting it into the player, then what would I put into a function to play it? I'm trying to get the animation to play in the character when they Press Q. I already have the function, for when the player presses Q, something happens. |
|
|
| Report Abuse |
|
|
|
| 29 Dec 2014 03:08 AM |
| Also, I checked out the wiki. It didn't help much in terms of how to get it into the player then play it |
|
|
| Report Abuse |
|
|
Varyze
|
  |
| Joined: 19 Feb 2012 |
| Total Posts: 3135 |
|
|
| 29 Dec 2014 03:13 AM |
function onpress blah blah blah 'q'
workspace.Player.Animate.walk.WalkAnim.AnimationId = 'idididididid'
animation isnt my game, so idk. |
|
|
| Report Abuse |
|
|
| |
|
Pihs
|
  |
| Joined: 26 Dec 2014 |
| Total Posts: 813 |
|
|
| 29 Dec 2014 03:26 AM |
@Var
Stop answering threads when you know nothing.
you'll have to use plr = game.Players.LocalPlater, then plr:GetMouse, and you'll have to use :keydown() function also, I suggest looking it up in the wiki.
It explains it well.
Xucs/Leveraged/Tixmaker101/Cuxe - Banned 12/26/2014 - + 55k Post Count |
|
|
| Report Abuse |
|
|
|
| 29 Dec 2014 03:27 AM |
| Use the input service because it's cooler and a sign of higher skill level. |
|
|
| Report Abuse |
|
|
maddog645
|
  |
| Joined: 02 Dec 2009 |
| Total Posts: 46 |
|
|
| 29 Dec 2014 06:31 AM |
If you want the animation to fire while holding a tool, you can try this. 1) Place your animation and script in the handle of the tool and script script: local animation = script.Parent.(the name of your animation) -- leave out the brackets local tool = script.Parent.Parent tool.Equipped:connect(function(mouse) -- gets the mouse mouse.Button1Down:connect(function(key) -- gets the key if key:lower() == "q" then --key:lower() means for all alphabets in lowercase(not capital letters) tool.Parent.Humanoid:LoadAnimation(the name of your animation):Play() --keep the brackets end end) end)
--This should work but if your animation is very long, it will keep running then you have to put --wait(??) ?? is the whole time taken for your animation --tool.Parent.Humanoid:LoadAnimation(the name of your animation):Stop()
You can message me if it doesn't work as expected |
|
|
| Report Abuse |
|
|