How To Make A Button That Plays An Animation | Roblox Studio

Sdílet
Vložit
  • čas přidán 8. 07. 2024
  • Welcome back to another video! If you enjoy then leave a like and subscribe for more videos.
    Download Today's Project: www.roblox.com/library/807529...
    Time Stamps:
    Introduction: 0:00
    Making Animation: 0:10
    Making UI: 3:00
    Scripting: 4:25
    Finished Product: 7:15
    ------------------
    Links
    ------------------
    Manage Script: pastebin.com/a9WM2gcF
    Animation Script: pastebin.com/aJNE3HfF
    Discord: / discord
  • Jak na to + styl

Komentáře • 150

  • @KashTheKingYT
    @KashTheKingYT  Před rokem +4

    They moved the animation editor to the avatar tab btw!

  • @silxvrrr7007
    @silxvrrr7007 Před 2 lety +16

    i feel angry that someone below 14 is smarter than me

    • @thebadcowbunch
      @thebadcowbunch Před rokem +1

      Same man...the amount of 12 year olds tutorials I've relied on is unknowable

    • @silxvrrr7007
      @silxvrrr7007 Před rokem +1

      @@thebadcowbunch fr

    • @NotTheXe
      @NotTheXe Před rokem +1

      Im 13 and Ik a bit of coding,engineering and chemistry lol

    • @tnt0211
      @tnt0211 Před 2 měsíci

      Thanks very much!

  • @ErisRebel
    @ErisRebel Před 23 dny

    this video is uploaded 2 years ago and still more helpful than the other new videos
    Thank you so much

  • @thelifeofmaison3456
    @thelifeofmaison3456 Před 2 lety +1

    This will really work for my ferry game. Saves the marshals loosing their fingers by roleplaying so much.

  • @brandon6114
    @brandon6114 Před 2 lety +2

    Congrats on 500 subscribers!! Road to 1k :)

  • @Little_Plan3t
    @Little_Plan3t Před rokem

    Your a legend man, thank you

  • @reallettuce7963
    @reallettuce7963 Před rokem

    Can you help me. i am trying to do when animation plays, walkspeed = 0
    and when we click again animation stops

  • @Haunter_602
    @Haunter_602 Před 2 lety

    Very epic video.

  • @n0ziv505
    @n0ziv505 Před 2 lety

    how do i make a button that when u click the dummy starts the animation then when i click again it stops

  • @JG8DEVELOPS
    @JG8DEVELOPS Před 2 lety

    ooo this is epic

  • @kinetic158
    @kinetic158 Před rokem

    Do you know how to make it so that you have to press more that one button on the keyboard to get the anim to play? (1 but, 2 buts??)

  • @fajam2362
    @fajam2362 Před 2 lety +4

    Can you make a team cap or team max or team balancer pls

  • @scorch_the_hedgehog
    @scorch_the_hedgehog Před 2 lety

    this will work for sonic spinning but not moving unless you press w

  • @jeshirekitenkatt1212
    @jeshirekitenkatt1212 Před rokem +2

    I'm not sure I'm understanding this. When did you insert the event? Was there anything we were supposed to do with that? What do we do with the first script after "for I"? Having sat through the whole thing while desperately trying to get animation buttons to work with the animations I made, I just feel like I'm missing integral information. :(
    EDIT: Actually, upon looking again to double check I didn't miss anything - the cut from "for i" to having the event in is the same instance (around 5:58 ). Is there a section of the video missing??

  • @MrJulsterYT
    @MrJulsterYT Před 10 měsíci +1

    Great video I made an 1997's Michael Jackson Smooth Criminal stage and I Animate every move in the stage video.

  • @Tyger-Games
    @Tyger-Games Před měsícem

    what is the thing in replicated storage that says animate?

  • @foxgaming6259
    @foxgaming6259 Před rokem +3

    Can you make it so that way you can only play the animation if you have a certain morph equipped?

    • @Sammys-Not-Here
      @Sammys-Not-Here Před rokem

      just add an animation to the morph if you want help i can help you

  • @flundale
    @flundale Před rokem +2

    great video, honestly i suck at scripting, so that was really helpful

  • @brandon6114
    @brandon6114 Před 2 lety

    Nice :)

  • @moosepilot16
    @moosepilot16 Před rokem

    can you make it where the button makes an NPC do the animation? btw love the vid! :D

  • @asfdasDAdaDadasaDadaSDsd

    hey can you make a video where you just redo what you did on the part where you cut the vid on the "for i-" part where it was cut. that would help because i want to know what the codes was

  • @carotylle6656
    @carotylle6656 Před 2 lety

    I have been trying everything but it doesn't work

  • @incredibnlyreal
    @incredibnlyreal Před 2 lety +5

    hey, part of your video seems to have cut out. around 6:00, you start scripting `for i,v in pairs` and then it cuts to another script.

    • @seeven8091
      @seeven8091 Před 2 lety

      He liked without answering, lol

    • @cordz389
      @cordz389 Před 2 lety

      go into the description, you will see the manage script pastebin

    • @strangergamez4380
      @strangergamez4380 Před rokem

      @@cordz389 doesnt work so like

    • @KashTheKingYT
      @KashTheKingYT  Před rokem

      Yeah I had a keybind on OBS that paused my video and I didnt realize it 😅

    • @asfdasDAdaDadasaDadaSDsd
      @asfdasDAdaDadasaDadaSDsd Před rokem +1

      @@KashTheKingYT SO what happened during that time!?!??!!

  • @Ydhtcmo001
    @Ydhtcmo001 Před rokem

    what about a button in the keyboard to play the animation

  • @g4m3z24
    @g4m3z24 Před rokem

    i really wanna make a game where u can play an animation for an npc to do when u push a button, can u do a tutorial on that plz :D

  • @etob_TTPD
    @etob_TTPD Před 9 dny

    is there any way where you can make it on another model?

  • @NOVITUS12
    @NOVITUS12 Před 4 měsíci

    How can i do 2 anims?

  • @Malikdakid
    @Malikdakid Před 9 dny

    uhh wheres the part where you actually fire server? never saw it

  • @vindicatorepic
    @vindicatorepic Před rokem +1

    Hey! Can you make a video on how to make a physical part play an animation when you touch it? That would help a lot!

  • @idk-yt9hn
    @idk-yt9hn Před 11 měsíci

    i copyd both script did every thing but it wont play it

  • @JakeFatbag
    @JakeFatbag Před 2 lety +1

    How does your work mine comes up as a problem about the OnServerEvent thingy

    • @KashTheKingYT
      @KashTheKingYT  Před 2 lety

      Make sure the remote event is in replicated storage and everything is in the right spots.

  • @SoftStarTheLeader
    @SoftStarTheLeader Před rokem

    I'm having trouble, could you maybe explain if there's a way to do precise animations? I have 10 different animations in the folder and am very confused

    • @zaydtruck3496
      @zaydtruck3496 Před 9 měsíci

      Replace :GetChildren() by .Animation name here

    • @zaydtruck3496
      @zaydtruck3496 Před 9 měsíci

      Same with your buttons but Its .button name here

  • @Wafffez
    @Wafffez Před 2 lety

    TYSM

  • @gxngzfr
    @gxngzfr Před rokem +2

    THANK YOU SO MUCH NOW I LEARNED PROGRAMMING ITS EASYYY

  • @Wafffez
    @Wafffez Před 2 lety

    also if you can, can you explain what everything does because i am tired of copying a pasting i wanna actually learn to script

    • @KashTheKingYT
      @KashTheKingYT  Před 2 lety

      I try my best to do that, but it makes the videos super long.
      I only do that on my beginner tutorials :)
      Also I am gonna do more of those.

  • @ryynscape
    @ryynscape Před 2 lety

    Do you know how to make a script for a button to disable it? I have multiple looped animations but I dont know how to make a button to stop them.

    • @KashTheKingYT
      @KashTheKingYT  Před 2 lety +1

      so basically
      make a variable called
      local anim
      then whenever you are gonna use an animation do
      anim = humanoid:LoadAnimation(animationObject)
      then whenever the button is pressed just do
      if anim then
      anim:Stop()
      end

  • @resiilmoittaa1600
    @resiilmoittaa1600 Před 2 lety +3

    Hi! I'm making a roleplay game, where if you click a helmet on a shelf, it plays a animation with sound and puts the helmet on the character and adds max health, I've watched your previous videos however I'm not sure how to do this.
    Could you lend a helping hand?

    • @MieysoFelix
      @MieysoFelix Před 2 lety

      in the Script where the function detect the clicks, add the animation!

  • @ReeedddddK
    @ReeedddddK Před 10 dny

    ty

  • @randomIze4
    @randomIze4 Před rokem +3

    didnt work

  • @XenoVixity512
    @XenoVixity512 Před 2 lety

    Dude theres some parts that the code doesnt work

  • @user-lq5mw8tk8w
    @user-lq5mw8tk8w Před rokem

    How do I apply the non-humanoid? This video is a way to apply your own character, but how do you apply it to other non-human characters?

    • @KashTheKingYT
      @KashTheKingYT  Před rokem +1

      you can't animate non humanoids this way. you would have to make a motor 6d animation.

    • @thecrazedbanana7961
      @thecrazedbanana7961 Před rokem

      how do you make it work npcs?

  • @green_engineer2009
    @green_engineer2009 Před 2 lety

    could you make it so you get different faces depending on your health for example you have 50 hp your face will look slightly injured and then you get on like 1 hp you get a black eye and a few cuts

  • @Errm_anyway
    @Errm_anyway Před rokem

    mine does not work

  • @RiftIsTaken
    @RiftIsTaken Před rokem

    Thanks for my tutorial anim

  • @LensLuxify
    @LensLuxify Před rokem

    Nice :) But how did you make it so that when you hover over the button, it turns gray?

    • @KashTheKingYT
      @KashTheKingYT  Před rokem

      there is a property called AutoButtonColor in text buttons that does that

  • @pattcharachsaengsamrit5652

    It doesn't work fo me

  • @Itz_XxHunterxX
    @Itz_XxHunterxX Před 6 měsíci

    What about the manage local script? You stopped half way there.

  • @MariaHernandez-xe1gi
    @MariaHernandez-xe1gi Před 2 lety

    6:41 where I left up at (:

  • @FR00TP3NCH
    @FR00TP3NCH Před 2 lety

    Can you make it so you can do it with a proximity part because I don't know how to script as good as you can

  • @stepfordcountyexplained8219

    Howabout a physical button, like a part with a click detector in it

  • @fajam2362
    @fajam2362 Před 2 lety +3

    Can you make a team cap or team max or team balancer pls, also when r u gonna do face reveal, you has 500 subs now :moai:

    • @KashTheKingYT
      @KashTheKingYT  Před 2 lety

      I was actually gonna make that instead of this video but it was long

  • @boonyanitoo
    @boonyanitoo Před 9 měsíci

    If I want it to be animated when I press the button, what if I want it to freeze?For example, make an animation of raising your arm so when you press a button it will lift and hold until you press the mouse again.The character will slowly bring his arms down and return to his original position.
    HOW TO DO😢

    • @gwenissooooocool
      @gwenissooooocool Před 3 měsíci

      did you loop your animation when you made it? when youre making the animation press the edit tab, then loop =true

  • @xshellyx9340
    @xshellyx9340 Před 2 lety

    what happend to all your uploads??? you havnt uploaded for a week!

  • @MemePullz
    @MemePullz Před rokem

    WHEN I CLICK THE GUI IT DOESNT PLAY A ANIMATION PLEASE HELP !!

    • @KashTheKingYT
      @KashTheKingYT  Před rokem

      check for errors and make sure the animation id is correct and you animated with the same rig you play as (r6, r15, or rthro). Also make sure the animation is published to the game owner and not your profile if its a group game/team create game

  • @Johnnieduf2000
    @Johnnieduf2000 Před 2 lety

    i copied it exact and it didn't work anc cant seem to figure out where i went wrong

    • @KashTheKingYT
      @KashTheKingYT  Před 2 lety +1

      The animation is what went wrong.
      You have to make your own animation and publish it to the game creator

  • @coccinoimiraculous1559
    @coccinoimiraculous1559 Před 6 měsíci

    Every tutorial never works for me :(

  • @jaromali1
    @jaromali1 Před 2 lety

    when you wrote the script it was cut 6:00 and now is doesn't work

  • @coolkid_2554
    @coolkid_2554 Před 2 lety

    how to make it support custom charactars

  • @Yessirified
    @Yessirified Před 2 lety

    It doesnt work

  • @mlpofficialletupita
    @mlpofficialletupita Před 2 lety

    Can you add effects from the animation?

  • @brentrager8534
    @brentrager8534 Před 2 lety +2

    Should start a new minecraft world

  • @JoelOnVr
    @JoelOnVr Před rokem

    Also I can’t even do anything it didn’t show up the thingy

    • @KashTheKingYT
      @KashTheKingYT  Před rokem

      Change the animation id and also make sure you animated with the same rig that you are playing with. If it still doesnt work then check any errors you may have

  • @caramelxoxo294
    @caramelxoxo294 Před 2 lety

    Why so fast?

  • @Stalk18
    @Stalk18 Před 2 lety

    It's what I need ths

  • @pro-if7tk
    @pro-if7tk Před rokem

    didnt work
    :(

  • @vioket33
    @vioket33 Před rokem

    it wont let me export it

  • @Eludeeee
    @Eludeeee Před rokem

    You never said what to put in manage local

  • @waffleworms
    @waffleworms Před 2 lety

    Me : *Does This Entire Tutorial Being Confused And Finally Getting It*
    The Tutorial : *doesnt work*

    • @KashTheKingYT
      @KashTheKingYT  Před 2 lety

      Maybe the issue isn't the tutorial. It's you 😎
      The alternative is you can download the model in the description and see if that works for you. :)

    • @waffleworms
      @waffleworms Před 2 lety

      @@KashTheKingYT im on my moms computer, i cant do that, and i cant use roblox studio correctly anymore

    • @waffleworms
      @waffleworms Před 2 lety

      @Inko on my old PC it didnt work

    • @DarkTails111
      @DarkTails111 Před 2 lety

      @@KashTheKingYT Man U cutted the script once in 6:00

    • @scorch_the_hedgehog
      @scorch_the_hedgehog Před 2 lety

      bruh i download the model but how to change a animation? its not working it did work but i wanted to change the anim it now dosent work

  • @spacex6997
    @spacex6997 Před 2 lety

    It didn't work.

  • @floofysvoid9806
    @floofysvoid9806 Před 2 lety

    bruh you didnt tell me how to freeze the player while the animation is playing

  • @musicplayz7394
    @musicplayz7394 Před rokem +1

    4:11

  • @lucitheskelewolf6099
    @lucitheskelewolf6099 Před rokem

    r6?

  • @sogga8775
    @sogga8775 Před rokem

    Yeah this isn’t working for me

  • @panpoppo
    @panpoppo Před rokem

    its not working

    • @KashTheKingYT
      @KashTheKingYT  Před rokem

      Check for errors and make sure you changed the anim id and you animated with the same rig you play as

  • @PerfectlyInverted
    @PerfectlyInverted Před rokem

    plz stop animation button

  • @flylika
    @flylika Před 2 lety

    it didnt work :(

    • @KashTheKingYT
      @KashTheKingYT  Před 2 lety

      You are probably using an r6 character. Use r15

  • @BandzGzzz
    @BandzGzzz Před 3 měsíci

    Doesnt work

  • @KashTheKingYT
    @KashTheKingYT  Před rokem

    Updated/Better video:
    czcams.com/video/ky-KZAf7cyo/video.html

  • @pramanaboyy
    @pramanaboyy Před 2 lety

    NOOB MAKE A TEAM BALANCER NOW!!!!!!!!!!!!! EVERYONE NEED IT NOW!

    • @josmck32
      @josmck32 Před 2 lety +1

      maybe u can ask him nicely instead, and not going into every single person's idea in the comments going "NOOB NO" etc

    • @KashTheKingYT
      @KashTheKingYT  Před 2 lety

      Lol

  • @EternalizerBro
    @EternalizerBro Před rokem

    you can tell hes copying this from someone

    • @KashTheKingYT
      @KashTheKingYT  Před rokem

      This was too simple to copy from anyone.
      At the time I just didn't plan out my videos and winged it first attempt when I felt like making a video lol

    • @EternalizerBro
      @EternalizerBro Před rokem

      @@KashTheKingYT dont believe it

  • @XenoVixity512
    @XenoVixity512 Před 2 lety

    False info

  • @LightPlayzz
    @LightPlayzz Před rokem

    Instead of saying "write this, write that" Please explain what each part does, this doesn't teach anything other than how to write this one specific script.

    • @KashTheKingYT
      @KashTheKingYT  Před rokem

      This was definitely one of my worser videos.
      Please check out my newer videos as they explain stuff better.

  • @zodopi6
    @zodopi6 Před 2 lety +2

    waste of time did not work

  • @thegamingyuty525
    @thegamingyuty525 Před 2 lety

    it wont work dislike 😡