I just want you to know that I have watched almost every single video on YT on this subject, and your method is the only one that worked! Thank you for real dude
I am happy that you told us how to do them! I worked just fine! If you had a problem try going to project settings and avatar and then put the avatar type you animated on (eg.r6 or R15) then click save.
RoScripter Hey can you please make a video with different tool animations? Like an idle animation, running animation, and attack animation?? Like all in one script please. I’ve been trying to make these all work together but I can’t
@@pixilmon Same for me. Is there anyway you could help me? I have tried like a million things, and still nothing. Thank you for your help and support. :>
Remember that variables exist to make referencing objects easier, mainly in larger scripts where a variable may be mentioned several times. You don't need to make a variable for every single object in your script, especially when your script is only 10 lines long. For example, RoScripter makes an individual variable for the Humanoid here when it was not necessary. Simply using Character.Humanoid would've been fine and would make the script slightly more efficient as it uses less lines. The same goes with the Animation variable, since it's literally just Tool.Animation
I never knew you could do this! And is there a reason the last vid had only 3 comments? And on this one there is 43. Btw I was looking for a new scripter bc im new and am bored of the other people and I came across you and your really easy to follow! and if you followed and it didnt work I just use the model in the description so its a win win. Im waiting for you to hit 1K subs because you really deserve it! :D
Ah yeah. My livestreams get less comments because most of the audience interacts with me live in the live chat. That video was just a reupload of the stream. I'm glad I was able to help 😃 Thanks for watching!
!Just adding this for people who don't know! If your game is both R15 and R6, you'll have to make two different animations to fit both avatar types, or the animation just won't work.
omg thank you so much! i've been looking for this for forever and no other tutorial is easy like this, thanks, i made a gun recoil and water drinking anim :)
I'm new to the channel and this is my first video of yours and *my god* I expected a kid with an 8-bit mic to be talking but it's a most likely adult with a soothing voice, this is nice!
omg ive been looking through so many videos these past days like these and stressing ab it and this one is the best one yet cause it actually worked TYSM!
Thank you so much dude! As a Roblox Movie filmmaker, having animations in game for the sets is very useful for fight scenes... or anything in general- Now I can make all the animations I need / want with tools. Again, thanks so much for the easy tutorial.
@@Ash3D well when I get replies and comments I always get an email. Also lots of people have it on. Also there is a section where you can veiw comments you havent responded to.
these tutorials are the most informative tutorials ive seen on this stuff. the only feed back is to announce while your scripting when you space or capital letters or what you delete ive never scripted before but it was still informative enough to feel capable of learning! keep it up bro! ps ive made about five jump animations one thing that was an issue is the time frame in which it jumped to perform an action and for that action to be completed before it reset to the beginning. i dropped my frame rate to 15 to front flip and it worked before it wouldnt? maybe you can enlighten us thanks!
Finally, a (Script I meant) that ACTUALLY WORKS in my R6 game. Thank you! I'll be sure to subscribe and be on the lookout for more useful videos you have!
This didn't exactly work for me, when I put it in the animation simply would not play. Could you please specify where in the animation code I should be putting this? I already tried putting it right after local AnimationTrack = Humanoid:LoadAnimation(Animation) AnimationTrack:Play() and when that didn't work, I put it right before Tool.Activated:Connect(function() local Character = Tool.Parent local Humanoid = Character.Humanoid which didn't work either. I'm at a loss as to what to do next.
im making an axe for my roblox game and I noticed that there isn't any cooldown on the axe making it spammable. i was wondering how to fix that without breaking the script. other than that, this tutorial was amazing!
Thank you ro scripter, I Litterally wanna thank you so much, I have been trying to learn how to play animations and this tutorial just solved it, Ive been trying to learn how for 6 hours now, I was gonna give up as a game dev because i thought i was to stupid to understand it, But you just made me understand it properly, Im so happy that i might cry, thank you seriously thank you so much
To make the animation stop when unequiped, Try this: local Tool = script.Parent local Animation = Tool.Animation Tool.Activated:Connect(function() local Character = Tool.Parent local Humanoid = Character.Humanoid local AnimationTrack = Humanoid:LoadAnimation(Animation) AnimationTrack:Play()
so i just opened the animation editor and it deleted my whole game without an undo button very cool edit: i know it wasnt his fault im just saying it happened
Hey RoScripter, I have been trying to animate one tool for almost a week now, and I am getting very frustrated. I have followed multiple tutorials, done research, asked professional programmer friends, and I still am stuck. 99% of the time, my code will carry out the function/task that I give it. However, I have not been able to get any of my animations to play. If I substitute the animation for the print function, everything works fine, but when I have the animation, nothing happens in my output bar or it says LoadAnimation requires an Animation object. My animations are set to action, I made them myself, and I have tried local and regular scripts. I would appreciate it if you could give me some tips on why my animations won't work. I even followed this tutorial EXACTLY and made a very similar animation, but even your exact code did not work in my game. Thanks.
In order for it to work, the animation must be an instance. So when it says “local Animation = Tool.Animation”, I suggest making it “local Animation = Instance.new(“Animation”)”. Then, make another line of code that sets the animation id: “Animation.AnimationId = “rbxassetid://YourIdHere” Your code should look like this: local tool = script.Parent local Animation = Instance.new(“Animation”) Animation.AnimationId = “rbxassetid://YourIdHere” tool.Activated:Connect(function() local Character = tool.Parent local Humanoid = Character.Humanoid local AnimationTrack = Humanoid:LoadAnimation(Animation) AnimationTrack:Play() end)
here is the script to copy and paste it so you don't have to write it local Tool = script.Parent local Animation = Tool.Animation Tool.Activated:Connect (function() local Character = Tool.Parent local Humanoid = Character.Humanoid local AnimationTrack = Humanoid:LoadAnimation (Animation) AnimationTrack:Play() end)
I tried using this and the animation didn’t run until I unequipped the tool so I tried the model and it did the same, I don’t think is the script I think it is a game setting because I don’t get an error message
idk why it doesnt work for me ik this was made 2 years ago but whenever I use the script it gives me an error saying animation is not a valid member or tools edit: i just placed the animation under the handle i fixed it thou
Hey! Great question. To accomplish this, you would want to put code that plays the sound object right after where I said Animation:Play(). This should help developer.roblox.com/en-us/api-reference/function/Sound/Play. Thanks for watching!
It's a problem with the tool, not the script or animation. Try unanchoring, and naming the part in the tool "handle" so it attaches to your arm when you equip it.
OMG THANK YOU SO MUCH YOU ARE THE ONLY ONE THAT DOES NOT SPEND AN HOUR TALKING ABOUT SOMETHING UNRELATED THANK YOU YOU ARE SO UNDERRATED
@Samuel Vado Yes 😩
@Samuel Vado And somehow they get all the subs.
Just learning script and this was absolutely spot on! Thanks so much!
👍
now i can make my ‘Bruh Box’ tool useful
👍
For me a dab tool
Ah finally for hour of finding restless video to find this simple script, I appreciate lad, here's a like button.
I just want you to know that I have watched almost every single video on YT on this subject, and your method is the only one that worked! Thank you for real dude
I am happy that you told us how to do them! I worked just fine! If you had a problem try going to project settings and avatar and then put the avatar type you animated on (eg.r6 or R15) then click save.
I have been trying to make this for so long, but I couldn’t find a working script! Thanks a lot!
iRooki same
Haha, glad I was able to help guys. Thanks for watching!
RoScripter Hey can you please make a video with different tool animations? Like an idle animation, running animation, and attack animation?? Like all in one script please. I’ve been trying to make these all work together but I can’t
@@RoScripter for some reason it wont work
@@pixilmon Same for me. Is there anyway you could help me? I have tried like a million things, and still nothing. Thank you for your help and support. :>
Remember that variables exist to make referencing objects easier, mainly in larger scripts where a variable may be mentioned several times. You don't need to make a variable for every single object in your script, especially when your script is only 10 lines long. For example, RoScripter makes an individual variable for the Humanoid here when it was not necessary. Simply using Character.Humanoid would've been fine and would make the script slightly more efficient as it uses less lines.
The same goes with the Animation variable, since it's literally just Tool.Animation
I never knew you could do this! And is there a reason the last vid had only 3 comments? And on this one there is 43. Btw I was looking for a new scripter bc im new and am bored of the other people and I came across you and your really easy to follow! and if you followed and it didnt work I just use the model in the description so its a win win. Im waiting for you to hit 1K subs because you really deserve it! :D
Ah yeah. My livestreams get less comments because most of the audience interacts with me live in the live chat. That video was just a reupload of the stream. I'm glad I was able to help 😃 Thanks for watching!
I've been finding a video like this for so long, and if this works.. YOU'RE DIFFERENT TO THEM (good different)
That was it!? Other videos have to SCRIPT an animation and not actually animate it themselves. This makes Roblox scripting looks fun. Thank you!🙏🏻
!Just adding this for people who don't know!
If your game is both R15 and R6, you'll have to make two different animations to fit both avatar types, or the animation just won't work.
THANK YOUUUUUU
i did that still doesn't work
YES I HAVE BEEN SEARCHING FOR LIKE 3 HOURS AND THIS ACTUALLY WORKS TYSM!
Thanks! I might use this for the coffee
Anytime! Great idea!
omg thank you so much! i've been looking for this for forever and no other tutorial is easy like this, thanks, i made a gun recoil and water drinking anim :)
tysm! i wanted to make a game displaying animations i've made, and this helped me so much!
I'm new to the channel and this is my first video of yours and *my god* I expected a kid with an 8-bit mic to be talking but it's a most likely adult with a soothing voice, this is nice!
Aleksimaier Haha, I’m actually 14. I try to be as professional as possible when recording my videos. Thanks for watching!
14!?!? Bro you sound like an adult! Also np bro the video helped I liked it :)
And this is my other account btw, I’m on my phone
This is the most useful thing I could have found in my life. Thank you!
omg ive been looking through so many videos these past days like these and stressing ab it and this one is the best one yet cause it actually worked TYSM!
can u also do a video on how to make a dual tool with both arms??
i was searching tutorials on how to aniamte a tool like 2 days, and this one is working very well! thank you!
WOW best tutorial i have watched all day (and i have watched a lot, lol)!
Thanks so much! I’m so happy I was able to help. Thanks for watching!
@@RoScripter no problem!
I have been trying to find something related to this for weeks and this really helped me! Thanks man you earned a new sub
Thank you so much dude! As a Roblox Movie filmmaker, having animations in game for the sets is very useful for fight scenes... or anything in general- Now I can make all the animations I need / want with tools. Again, thanks so much for the easy tutorial.
Of course! I’m so happy I was able to help. Thanks for watching!
you are literally the best scripting youtuber, you are so clear on everything, and you are helping me very much, thank you
Thanks so much! I’m so glad I’ve been able to help. Thanks for watching!
@@RoScripter You are the best
mad bob Thank you! Your support means the world to me. Thanks for watching!
How does he answer everyone’s questions also can you teach us how to make the block do damage like a punch tool
Haha, I try my best to respond to as many comments as I can. Very good idea, I'll make a video on a sword script soon. Thanks for watching!
He responds so easily because youtubers get gmails whenever they get a comment on a video/comment
@@SincereSquirrel There is not a single youtuber that has that enabled, also it does not send you an email for every single comment.
@@Ash3D well when I get replies and comments I always get an email. Also lots of people have it on. Also there is a section where you can veiw comments you havent responded to.
these tutorials are the most informative tutorials ive seen on this stuff. the only feed back is to announce while your scripting when you space or capital letters or what you delete ive never scripted before but it was still informative enough to feel capable of learning! keep it up bro! ps ive made about five jump animations one thing that was an issue is the time frame in which it jumped to perform an action and for that action to be completed before it reset to the beginning. i dropped my frame rate to 15 to front flip and it worked before it wouldnt? maybe you can enlighten us thanks!
true
this is so good this help a ton
very good
Finally, a (Script I meant) that ACTUALLY WORKS in my R6 game. Thank you! I'll be sure to subscribe and be on the lookout for more useful videos you have!
if you want to prevent animation spamming
do this
if not animation.IsPlaying then
animation:Play()
This didn't exactly work for me, when I put it in the animation simply would not play. Could you please specify where in the animation code I should be putting this? I already tried putting it right after
local AnimationTrack = Humanoid:LoadAnimation(Animation)
AnimationTrack:Play()
and when that didn't work, I put it right before
Tool.Activated:Connect(function()
local Character = Tool.Parent
local Humanoid = Character.Humanoid
which didn't work either. I'm at a loss as to what to do next.
@@hamsteak5013 did you check the output?
@@Jcob_C Where can I check that?
Can u make a vid to where it doesn't instantly hit u have a cool down?
im making an axe for my roblox game and I noticed that there isn't any cooldown on the axe making it spammable. i was wondering how to fix that without breaking the script. other than that, this tutorial was amazing!
Right before the script says end write this ´Wait(And however long you want the the cooldown in here)´
@@mucky8231 it doesnt work for me, its still spammable
THIS GUY LITERALLY SAVED MY LIFE!
Thank you ro scripter, I Litterally wanna thank you so much, I have been trying to learn how to play animations and this tutorial just solved it, Ive been trying to learn how for 6 hours now, I was gonna give up as a game dev because i thought i was to stupid to understand it, But you just made me understand it properly, Im so happy that i might cry, thank you seriously thank you so much
Of course! Your support and kind words mean so much. I'm so happy to hear I was able to help. Thanks for watching!
Is there anyway for the animation to play when the tool is equipped without clicking?
same
@Mild Gamespro where do i put that?
@Mild Gamespro forget,found it
@@rdude309 where?
another guy made that script
Thx man, i was trying to make an animation for a tool and it wasn't working, when i saw this video i realised i forgot to change the priority
I've tried so many scripts but it always says "LoadAnimation requires Animation Object" please help me with this problem.
You should create an Animation instance first and load id into it, not just Humanoid:LoadAnimationID(id_here)
it worked tysm this was a great Video, keep up the good work man!
I’m so happy I was able to help. Thanks for watching!
To make the animation stop when unequiped, Try this:
local Tool = script.Parent
local Animation = Tool.Animation
Tool.Activated:Connect(function()
local Character = Tool.Parent
local Humanoid = Character.Humanoid
local AnimationTrack = Humanoid:LoadAnimation(Animation)
AnimationTrack:Play()
Tool.Unequipped:Connect(function()
AnimationTrack:Stop()
end)
end)
Thank you so much
tysm it works but if i dont press 1 (so the weapon doesnt stay in my hands) it keeps doing the animation
@@NickyAOAOOAOA if you looped the animation then it'll play forever, unloop it and it should work.
@@revivedblue yes I found out tysm tho
Thanks bro, This was really helpful!
you are the best. I liked and sub
Nice video dude!
Thanks!
omg thx i tried i think 5 scripts but this one works
How do you make like 2 or more animations work in order when you press mouseclick or mobile tap
I watched this before but now i need it
thx You Saved Me I lEgit Find Alot That Didn't Work And This One Saved Me
I’m so happy I was able to help. Thanks for watching!
Thanks😊 Now I Can Make My Own Animation In My |BA| British Army Thanks So Much! Shoutout Me Next Video!
Glad I was able to help. Thanks for watching 😃
Bro I really luv ur vids I was like ok this video I have to sub right now!
tysm this relly helped whit my game im working on :D!
Whenever i try to click with my tool the animation always repeats again and again
U probs set ur anim to loop
@@ZiRR0 i didnt and it does that so your wrong
@@meowmrre Add
AnimationTrack:Stop()
after
AnimationTrack:Play()
so i just opened the animation editor and it deleted my whole game without an undo button
very cool
edit: i know it wasnt his fault im just saying it happened
did it delete the whole thing or were you still able to revert versions
Hello I love this @RoScripter
you earned a subscriber :)
Nice, now I can make tools that aren’t just a paper.
I cant export animation
thank you so much! i really needed this for my game!
Anytime! Thanks for watching!
Hey RoScripter, I have been trying to animate one tool for almost a week now, and I am getting very frustrated. I have followed multiple tutorials, done research, asked professional programmer friends, and I still am stuck. 99% of the time, my code will carry out the function/task that I give it. However, I have not been able to get any of my animations to play. If I substitute the animation for the print function, everything works fine, but when I have the animation, nothing happens in my output bar or it says LoadAnimation requires an Animation object. My animations are set to action, I made them myself, and I have tried local and regular scripts. I would appreciate it if you could give me some tips on why my animations won't work. I even followed this tutorial EXACTLY and made a very similar animation, but even your exact code did not work in my game. Thanks.
yes same thing happen too me, probably because the script is one year old and studio has updated a lot
In order for it to work, the animation must be an instance. So when it says “local Animation = Tool.Animation”, I suggest making it “local Animation = Instance.new(“Animation”)”. Then, make another line of code that sets the animation id: “Animation.AnimationId = “rbxassetid://YourIdHere” Your code should look like this:
local tool = script.Parent
local Animation = Instance.new(“Animation”)
Animation.AnimationId = “rbxassetid://YourIdHere”
tool.Activated:Connect(function()
local Character = tool.Parent
local Humanoid = Character.Humanoid
local AnimationTrack = Humanoid:LoadAnimation(Animation)
AnimationTrack:Play()
end)
@@PuffyNutty thanks a lot
@@PuffyNutty thx so much
@@PuffyNutty Tis dont work no more or atleast for me doesnt work
thx mate i messed up my script. so thx for you script. cya fellow developer :D
THANK YOU SO MUCH! I COULD NEVER MAKE A WORKING SCRIPT BUT THIS ONE WORKS!
Thanks :D!! Now I can do a vending machine thx!
Omg seriusly you are helping me so much! I love you!!!
Haha. Glad I was able to help 😃
Wow... LOVE ❤️🧡💛💚💙💜 lol 😆😳🤑😝😄😌😉🤔🤫🤭🙃🥺😩🚨
i made an animation and the arm thats holding the item wouldnt move and the others would move except the right arm how do i fix this?
I needed this, thx so much!
It worked! Thank you so much!
Of course! Thanks for watching!
Thank you so much. Only you scripts work!
Hey, quick question, how can I make multiple animations such as walking, running and jumping?
Wow! The first video ever without any dislikes!
Sadly it now has 2 but still very low!
here is the script to copy and paste it so you don't have to write it
local Tool = script.Parent
local Animation = Tool.Animation
Tool.Activated:Connect (function()
local Character = Tool.Parent
local Humanoid = Character.Humanoid
local AnimationTrack = Humanoid:LoadAnimation (Animation)
AnimationTrack:Play()
end)
You make like everything I need tyyyyyy so much!
Good video im subscribing
Thanks! Your support means a lot. Thanks for watching!
@@RoScripter no problem
Bro Thanks i’ve been looking for one but all of them are broken new sub
THANK YOU THANK YOU THANK YOU IGE BEEN TRYING TO FIGURE THIS OUT FOR DAYS
THANK YOU SOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO MUCH!!!!!!!!!!!!!!!!!!!!!!
THIS DANG WORKS
Hey, I was wondering how to make an walking animation with an tool? So like when you take out the tool it changes the walk animation?
SAME but i think i might know how to do it
thanks worked perfectly
That helped a lot! Thank you!
it doesn't work for me, on every video i watch the animation never plays
I tried using this and the animation didn’t run until I unequipped the tool so I tried the model and it did the same, I don’t think is the script I think it is a game setting because I don’t get an error message
It’s happening to me to :/
Set animation priority to action!
How do you add a cooldown for the animation?
Nvm, just used a debounce
this works in studio but once you go into the actual game you cant do it
cap and cheese
idk why it doesnt work for me ik this was made 2 years ago but whenever I use the script it gives me an error saying animation is not a valid member or tools
edit: i just placed the animation under the handle i fixed it thou
Thank you, you helped me a lot now I can do the soccer game now I can see how I do so that the ball rolls dx
Of course. Thanks for watching!
You grew so much over a year
The completed script: 9:47
(This was mainly for myself lol)
TYSM ITS WORKING
Thanks you so much !
I'm gonna use this to make a banana dropped on the floor become a transfur ;D
can you make it that if you hold the animation will loop
I love how he ads the link and shows us how to do it.
THANK YOU SO MUCH OKG IT WORKED AND IM HAPPY COCJKDUCJS CJDDJ
You’re welcome! I’m so happy I was able to help. Thanks for watching!
How do i add a sound when a animation plays (ex.drinking coffee)
Hey! Great question. To accomplish this, you would want to put code that plays the sound object right after where I said Animation:Play(). This should help developer.roblox.com/en-us/api-reference/function/Sound/Play. Thanks for watching!
if your animation keeps playing make sure its not looped
your amazing u even put it on description
Thanks so much! Your kind words mean a lot. Thanks for watching!
@@RoScripter a cool down maybe?
thanks for the help
tnx RoScripter
Thank you, but the only problem is that i maked animation for left hand not right
Great Thanks!
thank you so much you are a legend
you are my god... thx!!
For some reason when i select it in the starter pack, it gets me stuck in the floor. Is this a problem with the scripting or the animation?
It's a problem with the tool, not the script or animation. Try unanchoring, and naming the part in the tool "handle" so it attaches to your arm when you equip it.
@Daniela Quinonez , I think you have to remove the weld? IDKK
Try removing the anchors, that’s what worked for me