How to MAKE Animations Play When A Part Gets Touched.. (Roblox Studio)

Sdílet
Vložit
  • čas přidán 28. 03. 2023
  • 🛠Thanks so much for watching, hope you guys have a great day! Subscribe 😎🛠
    Animation Tutorial: • The ULTIMATE Beginner'...
    😎Subscribe: www.youtube.com/@rustysillyba...
    💬Discord: / discord
    🌴Roblox Group: www.roblox.com/groups/1729640...
    👑Rusty Merch: www.roblox.com/groups/1729640...
    ⌚Timed Chapters:
    📝Tags:
    #roblox #robloxstudio #lua #robloxstudiotutorial #tutorial #howto #robloxanimation
    ❓What is Roblox Studio?
    🔎Roblox Studio lets you create anything and release with one click to smartphones, tablets, desktops, consoles, and virtual reality devices.
    ❓Who am I?
    🔎I am a Roblox Studio, and Blender, Tutorial CZcamsr that you should Subscribe to :)
  • Jak na to + styl

Komentáře • 529

  • @rustysillyband
    @rustysillyband  Před rokem +362

    local anim = script.Animation
    local humanoid = script.Parent.Humanoid
    local animTrack = humanoid:LoadAnimation(anim)
    local debounce = nil
    game.Workspace.Part.Touched:Connect(function(hit)
    local player = game.Players:GetPlayerFromCharacter(hit.Parent)
    if player and debounce == nil then
    debounce = true
    animTrack:Play()
    wait(1) -- Change this to however much time you want to wait until the animation can play again.
    debounce = nil
    end
    end)

    • @madnessWG
      @madnessWG Před rokem +17

      OH HOLY RUSTY I HAVE BEEN SEARCHING FOR 3 DAYS IN A ROW FINDING THIS BELOVED SCRIPT TO MAKE A ROBLOX GAME! THANK YOU GENTLEMEN

    • @madnessWG
      @madnessWG Před rokem +6

      Oh holy rusty of the god please make a r6 version. To make my zombie game! So I can finally rest of holy God named rusty please read this comment and heart it so your presence Is known!

    • @MarxismOfficial
      @MarxismOfficial Před rokem +3

      thx

    • @theonlyWrck
      @theonlyWrck Před rokem +2

      Oooookooiiiiiio

    • @YourLocalWeirdPerson36
      @YourLocalWeirdPerson36 Před rokem +2

      @@theonlyWrck oOoOooOoOooOoOooOoOoOooO

  • @Jlian_VR
    @Jlian_VR Před 8 hodinami

    You don’t know how helpful this video was, I’m just glad it was short and easy this is one of my favorite tutorials ever!

  • @battlestevieonyt
    @battlestevieonyt Před rokem +118

    Dude, thank you so much. I couldn't find out how to do this, but you made it easy. You are an absolute life saver thank you so much. you earned a subscriber

  • @NOTJACKDOODS447
    @NOTJACKDOODS447 Před rokem +15

    Alright Guys If You Need To Do A Custom Avatar then heres The Steps:
    add the animationcontroller into a humanoid you insert
    make ur animation
    insert a script the add an animation inside it
    copy this script:
    local anim = script.Animation
    local humanoid = script.Parent.Humanoid
    local animTrack = humanoid:LoadAnimation(anim)
    local debounce = nil
    game.Workspace.Part.Touched:Connect(function(hit)
    local player = game.Players:GetPlayerFromCharacter(hit.Parent)
    if player and debounce == nil then
    debounce = true
    animTrack:Play()
    wait(1) -- Change this to however much time you want to wait until the animation can play again.
    debounce = nil
    end
    end)
    make sure to change the part to your parts name
    And Test it!

  • @zazmraz
    @zazmraz Před rokem +24

    My brother has been wanting something like this forever. Thank you for a tutorial that is simple and makes sense 👍

  • @Tackiejuice
    @Tackiejuice Před rokem +19

    Tip for beginners it looks better if the block is invisible

    • @0tt869
      @0tt869 Před 10 měsíci +2

      then the player wouldn't even know where the part goes, or unless you're making that part some kind of zone or something. plus this is an opinion

    • @Flixy207
      @Flixy207 Před měsícem

      @@0tt869 i think you dont know how it works you can check a button thats called cancollide and if its disabled it wouldnt work but if its invisible it still works im a scripter builder and a animator (i just tried it out myself it works)

  • @BorelessRBLX
    @BorelessRBLX Před 11 měsíci +2

    tysm, I'm finally working on the dream of becoming a roblox developer. I'm collaborating with a dev and working on the game and thats exactly what i needed. You just earned a subscriber. You are very helpful and i respect you for that.

  • @melxfurss
    @melxfurss Před 13 dny +2

    Amazing video!

  • @spongeroffical
    @spongeroffical Před 9 měsíci +27

    how to make the easiest basic jumpscare:

    • @ELVR_YouTube
      @ELVR_YouTube Před 20 dny +2

      not me remaking the batim "boarded up ink machine room" jumpscare

  • @classicsonicsim
    @classicsonicsim Před 11 měsíci +3

    For people who dont know how to find the id, when you make the id and publish it, dont press cancel and look at the thing below the name of the animation and youll see the id and you can write it on a paper or copy and paste

  • @deaththor
    @deaththor Před rokem +22

    Cool! i just want to know how to make the player do the animation

  • @tiamckay1010
    @tiamckay1010 Před 10 měsíci +2

    I found this vid months ago and forgot to comment and like, thank you SO MUCH. Underrated fr!

  • @sk3lly23
    @sk3lly23 Před měsícem

    This is really useful if you're making easter eggs ngl, like if you touch the block a character who was watching you runs away and hides but you cant get through there. Kind of like the ewok village in battle front.

  • @Yuri-not_real
    @Yuri-not_real Před rokem +9

    Thank you I'm gonna start learning from you dude I really wanna get good at animation and start my own channel hopefully I learn fast

  • @Soos43v3r
    @Soos43v3r Před rokem +3

    OMG DUDE YOU ARE SUCH A LIFE SAVER THANK YOU SO MUCH THIS WILL MAKE MY GAME 10X BETTER!!!!!!!!!

  • @Atlas_TheAdventurerOG
    @Atlas_TheAdventurerOG Před 7 dny +2

    That's Amazing, but do you know how to make a NPC peek like Opila Bird in garten of banban so when you look at the npc it plays a slide animation and unloads?

  • @Polygonfella1662
    @Polygonfella1662 Před 11 měsíci +1

    I don’t even make roblox things I just okay it but it’s fun to watch these types of videos!

  • @blueboy1069
    @blueboy1069 Před rokem +3

    Thank you very much now I'm the Find game, I say I say thank you I appreciate it and that's why I subscribe and give you a like you deserve it :D

  • @1EAS1World
    @1EAS1World Před rokem +5

    This is going to be extremely useful.. Thanks!

  • @grundlyman
    @grundlyman Před 11 měsíci +3

    WOW THANKS DUDE!

  • @Gagulk_Fanta_Studio
    @Gagulk_Fanta_Studio Před 9 měsíci +2

    this is why i sub to you

  • @YinTB
    @YinTB Před rokem +2

    thank you so much i actually needed this!!

  • @user-sh2gh9ei3j
    @user-sh2gh9ei3j Před 10 měsíci +1

    Bro hit the quickest backflip I've ever seen on roblox

  • @EllisPierce015
    @EllisPierce015 Před rokem +5

    love this tysm

  • @Duncan_TDA
    @Duncan_TDA Před 9 měsíci +1

    YO TYSM IT GOT STRAIGHT TO THE POINT IT WORKS

  • @LagOfficials25
    @LagOfficials25 Před 10 měsíci +2

    Its good for get quest and touch some invis block and the npc will do animation wave + chat

  • @star6818
    @star6818 Před 6 dny

    Thank you!

  • @Insnane_editz
    @Insnane_editz Před rokem +19

    thx so much i was searching for this for 3 weeks edit: HOW I GOT THAT MANY LIKES

  • @TheRealSKEFT
    @TheRealSKEFT Před měsícem

    This Helped me make a chasing scene thanks!!

  • @LEGOmotionclips
    @LEGOmotionclips Před rokem +1

    love u man helped me so much

  • @ladybugbee
    @ladybugbee Před 9 měsíci +3

    Tip to everyone if it's not working:
    Make sure you rename the "Part" in it to the part you want to use to trigger the animation
    I named mine "CutscenePart"
    "game.Workspace.Part.Touched:Connect(function(hit)"

  • @AgentGilded
    @AgentGilded Před 11 měsíci +6

    If anyones wondering how to make the person disapear after it's over, you need to place another part in the same spot as the animations player, and put this script in the part:
    script.Parent.Touched:Connect(function()
    wait(6)
    game.Workspace.MODEL_NAME_HERE:Destroy()
    end)
    Make sure to change the number after 'wait' to however long it takes to play the animation.
    i was gonna ask how to do this, but i figured it out myself lol

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

    When i look up animation tutorials it gets me lost in the whole scripting part, this short helps me alot

  • @StarLeaderX
    @StarLeaderX Před rokem +6

    I am so glad I subscribed to you because now I get recommended awesome videos like this. Also, I'm a game dev so I should know this, but how do I enable the outline thing when hovering over something in studio?

    • @rustysillyband
      @rustysillyband  Před rokem +2

      You should be able to go over to the top left where it says "File" and open that up. Once you're there, open up "Studio Settings.." Then, scroll down to where it says "Tools" and then turn on "Show Hover Over". If that doesn't do the trick, then scroll down and try turning up the "Hover Line Thickness" Hope this helps!

    • @StarLeaderX
      @StarLeaderX Před rokem +3

      @@rustysillyband Thank you so much!

  • @Drkdmrhn
    @Drkdmrhn Před rokem +3

    THANK YOU!!

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

    Thanks For making Everything so simple

  • @tinog-ri9li
    @tinog-ri9li Před 7 měsíci

    YOU DONT KNOW HOW MUCH I NEEDED TO MAKE A ROOMS GAME WITH THIS LIKE IVE BENN SECHING BUT FINALLY I FOUND ONE THANK YOU SO MUCH FOR THIS YOU GAINED A SUB

  • @thefloppagaming6936
    @thefloppagaming6936 Před rokem +3

    TY SOOOO MUCH!

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

    thank dude! also the funny part is that if i play the figure animation it was float in the air

  • @CeEne493
    @CeEne493 Před 7 měsíci

    exactly what i need, wonderful video

  • @SeaStar_YT
    @SeaStar_YT Před rokem +6

    Bro this guy is underrated

  • @Diego_RTA
    @Diego_RTA Před 27 dny +1

    . . .
    GRACIAAAAAS

  • @RyderModsOFICIAL
    @RyderModsOFICIAL Před rokem +3

    bro you are an angel thanks man 🙏 I'm making a doors game and I needed this to do seek

  • @verycoolgamerboy
    @verycoolgamerboy Před 9 měsíci +1

    ty bro now i can make a chase scene now :D

  • @Riv3rz
    @Riv3rz Před 10 měsíci +3

    This is really cool and it helps so much! but when it comes to Roblox Studio it helps a lot to keep it 6:3 resolution

  • @Piggyandblue
    @Piggyandblue Před rokem +1

    Thanks so much

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

    IT'S A MIRACLE, I FINALLY FOUND IT, THANKS

  • @elite_scientist_tv_man
    @elite_scientist_tv_man Před měsícem

    ty man you realy are the gaot

  • @exquisitenoob1392
    @exquisitenoob1392 Před rokem +2

    thanks bro im late but this is fast easy and awesome!

  • @wilsonplayz1000
    @wilsonplayz1000 Před 4 měsíci +1

    FINALLY ALRIGHT HERES A SUB

  • @kiritokun1480
    @kiritokun1480 Před rokem +1

    Legend.

  • @Khalilmatias
    @Khalilmatias Před 10 dny

    thanks u so much i've been finding dizz

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

    Thanks for the video.

  • @MarxismOfficial
    @MarxismOfficial Před rokem +3

    thx

  • @seambrowne686
    @seambrowne686 Před rokem +1

    Thanks alot

  • @GamingForYT_
    @GamingForYT_ Před 11 měsíci +2

    Tysm bro

  • @Tackiejuice
    @Tackiejuice Před rokem +1

    So simple wonderful

  • @NLIOMEX
    @NLIOMEX Před rokem +2

    THANKS FOR THE VIDEO NOW I MADE A GAME !!!!!🎉🎉🎉

    • @rustysillyband
      @rustysillyband  Před rokem +1

      Congrats!!! I'd love to play it!

    • @NLIOMEX
      @NLIOMEX Před 10 měsíci

      Thanks would you mind make a tutorial on my game :)

  • @rustyblade7977
    @rustyblade7977 Před 11 měsíci +1

    thank you for explaining how the script actually works!

  • @user-xn7bu9rk9j
    @user-xn7bu9rk9j Před 11 měsíci +1

    my guy a legend

  • @Best0Edited
    @Best0Edited Před 5 měsíci

    Its useful thanks!

  • @Train2822
    @Train2822 Před rokem +4

    I saw you in Roblox Studio that was named “NPCTesting”, were you using it for this one?

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

    THANKS ALOT!!! YOU ARE THE BEST SCRIPTER!!!

  • @Hussein-be1qm
    @Hussein-be1qm Před rokem +1

    YOU GOOD
    :)

  • @Simplyeditz01
    @Simplyeditz01 Před 7 měsíci +1

    LIFE SAVER ;)

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

    THANK YOU BRO!!!!

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

    UR THE BEST

  • @Kakimaki03-jd1gx
    @Kakimaki03-jd1gx Před 11 měsíci +1

    omg bro tysm

  • @ChimpTony
    @ChimpTony Před 8 měsíci

    THANK YOU SO MMMUCH MUCH, MUCH. THIS GONNA BE THE BEST IDEA FOR MONKEY BARS

  • @user-zj1qk4mv2e
    @user-zj1qk4mv2e Před 2 měsíci

    This is actually great you're a damn legend! Could you also do one on a script to animate a custom mesh?

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

      Hi there! Thank you for watching, hope you enjoyed it! For animating custom meshes, you will need to first rig the character for it. You can follow along this tutorial here and you are good to go:
      czcams.com/video/2KdzgpHIA6s/video.html
      Have an amazing day!

  • @Brqv3
    @Brqv3 Před 11 měsíci +7

    aint nobody gonna talk about how fast the backflip was like fr tho

  • @dawidekchoinski
    @dawidekchoinski Před 8 měsíci

    THX YOU SO MUCH

  • @Jam_Editz420
    @Jam_Editz420 Před 6 dny +1

    how do i play the animation while its anchored?

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

    ty

  • @maciejstemplewski4883
    @maciejstemplewski4883 Před 6 měsíci +1

    how to make this like a hitting ground with a effects?

  • @UltraInstinctZone
    @UltraInstinctZone Před 7 měsíci

    tysm bro!

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

    Tysm!!!

  • @DlFFQ
    @DlFFQ Před 7 měsíci +2

    I am banging my head on the wall wondering why it worked for everyone else

    • @sonnyscozzafava233
      @sonnyscozzafava233 Před 7 měsíci

      BRO FR HOW

    • @Osstick
      @Osstick Před 3 měsíci +1

      you needa put the script in both the script INSIDE humanoid and INSIDE the part and make sure "humanoid" inside your rig has "animationcontroller"

    • @Cheeser409
      @Cheeser409 Před měsícem

      ​@Osstick ok I'll put 1 in one and copy on into the other

    • @Cheeser409
      @Cheeser409 Před měsícem

      ​@@Osstickyou fucking lied

    • @Osstick
      @Osstick Před měsícem

      @@Cheeser409 yup

  • @vukovdjuro8122
    @vukovdjuro8122 Před rokem +5

    Bro u are soooo underrated!!!

  • @whiterun9650
    @whiterun9650 Před rokem +1

    can you make it the same but it only able to get on only once? and on a player

  • @kingyzz
    @kingyzz Před 7 měsíci

    I LOVE YOU

  • @unladybug
    @unladybug Před rokem

    ok so follow along: my player is dancing. when it touches the part, the character is r6 and it plays the animation in r6. when a r15 player touches it, it plays a different animation in r15. do u know how to do that?

  • @Arct1y
    @Arct1y Před 11 měsíci +1

    How do you make a full on moon animator 2 cutscene play when the part is touched?

  • @sadaangaming
    @sadaangaming Před rokem +1

    sorry but if i place the dummy somewhere else it starts the animation from there but still thanks

  • @TheNoobKing12
    @TheNoobKing12 Před 3 dny

    I cant even animate a dummy walking 😭 this sh** to hard

  • @epicmoment39843
    @epicmoment39843 Před 5 měsíci

    this is so useful, thanks! im trying to make a one time jumpscare (and theres already a comment that explains how to destroy the rig after it plays once) but could you give pointers on how to make the rig be the avatar of the person who steps on the part? tryna do a little spooky peek around the corner type scare.

    • @rustysillyband
      @rustysillyband  Před 5 měsíci +1

      Hi! For that, you would need to apply the Humanoid Description of the player to the rig. Here's what I like to do for it:
      local humanoidDescription = game.Players:GetHumanoidDescriptionFromUserId(player.UserId)
      player.Character.Humanoid:ApplyDescription(humanoidDescription)

    • @epicmoment39843
      @epicmoment39843 Před 5 měsíci

      @@rustysillyband legend! thank you so much 💪

  • @BonkyBoko9
    @BonkyBoko9 Před rokem +10

    How do you make it play once, so that if you step on the part again, it doesn’t play

    • @rustysillyband
      @rustysillyband  Před rokem +4

      You can either destroy the part right after that, or add a debounce to it.

    • @memercleaner
      @memercleaner Před 10 měsíci

      How would I add debounce?

    • @RxshyyFn
      @RxshyyFn Před 7 měsíci

      set debounce to true@@memercleaner

    • @RxshyyFn
      @RxshyyFn Před 7 měsíci

      i think so@@memercleaner

  • @xkerfuffIe
    @xkerfuffIe Před 3 hodinami

    this is good and all, but what if im clicking the part?

  • @koalajemugamer4550
    @koalajemugamer4550 Před 11 měsíci +1

    the thing is i want to make a animation loop while in game

    • @rustysillyband
      @rustysillyband  Před 11 měsíci

      You can either use animTrack.Looped = true, or you can just set your animation to looping while you're creating it.

  • @cupheadtation
    @cupheadtation Před rokem +1

    yeah

  • @thefloppagaming6936
    @thefloppagaming6936 Před rokem +4

    How to paly 2 or more animations at the same time by touching the part?

  • @Gameramen
    @Gameramen Před 29 dny

    It worked

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

    00:05

  • @nebilimkanaladistexd9577
    @nebilimkanaladistexd9577 Před 9 měsíci +1

    how do i animate 2 rigs at the sime time?

  • @HEISHEREHELPME
    @HEISHEREHELPME Před měsícem

    Pls make a version where you can switch if its loopable or not

  • @ibrahim_gamer2
    @ibrahim_gamer2 Před 6 měsíci +1

    Where can you find the animationID

  • @-aliyahsrevenge-
    @-aliyahsrevenge- Před 11 měsíci +1

    print("hello")
    roblox studio when into python mode 💀

  • @roanroblox8962
    @roanroblox8962 Před rokem +2

    I used R6 so when touch it it gives me a tool

  • @KYPSTRYOG
    @KYPSTRYOG Před rokem +2

    AMAZING you earned a sub also how do I make it loop forever??

  • @quicanosgemeplays22br
    @quicanosgemeplays22br Před 22 dny

    If things were basic like scratch😭