How to MAKE Animations Play When A Part Gets Touched.. (Roblox Studio)
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
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)
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
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!
thx
Oooookooiiiiiio
@@theonlyWrck oOoOooOoOooOoOooOoOoOooO
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!
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
agreed
69
HOW DO I COPY AND PASTE THE ANIMATION ID
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!
Ty but it still isn’t working
did you type the script in right?
My brother has been wanting something like this forever. Thank you for a tutorial that is simple and makes sense 👍
Tip for beginners it looks better if the block is invisible
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
@@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)
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.
Best of luck!
Amazing video!
how to make the easiest basic jumpscare:
not me remaking the batim "boarded up ink machine room" jumpscare
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
THANKS GOD I WAS STRUGGIYLNG TO FIND THE ID
actual lifesaver my man
Cool! i just want to know how to make the player do the animation
Mee to
I don t know
I found this vid months ago and forgot to comment and like, thank you SO MUCH. Underrated fr!
Appreciate it!
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.
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
OMG DUDE YOU ARE SUCH A LIFE SAVER THANK YOU SO MUCH THIS WILL MAKE MY GAME 10X BETTER!!!!!!!!!
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?
I don’t even make roblox things I just okay it but it’s fun to watch these types of videos!
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
This is going to be extremely useful.. Thanks!
Glad you think so!
WOW THANKS DUDE!
this is why i sub to you
thank you so much i actually needed this!!
Bro hit the quickest backflip I've ever seen on roblox
love this tysm
I'm glad you like it
YO TYSM IT GOT STRAIGHT TO THE POINT IT WORKS
Its good for get quest and touch some invis block and the npc will do animation wave + chat
Thank you!
thx so much i was searching for this for 3 weeks edit: HOW I GOT THAT MANY LIKES
This Helped me make a chasing scene thanks!!
love u man helped me so much
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)"
it still didnt work
@@ayceni same
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
Thanks for helping!
OMG THANKS
does this work at moon??@@rustysillyband
@@rustysillyband Does this work with models?
When i look up animation tutorials it gets me lost in the whole scripting part, this short helps me alot
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?
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!
@@rustysillyband Thank you so much!
THANK YOU!!
Thanks For making Everything so simple
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
TY SOOOO MUCH!
thank dude! also the funny part is that if i play the figure animation it was float in the air
exactly what i need, wonderful video
Bro this guy is underrated
Thanks!
. . .
GRACIAAAAAS
bro you are an angel thanks man 🙏 I'm making a doors game and I needed this to do seek
can you give me link to your game when you have the chance i wanna try it out pls?
:)
@@ballheadbillings8288 I couldn't make the game I deleted the game my computer Pifu
ty bro now i can make a chase scene now :D
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
Thanks so much
IT'S A MIRACLE, I FINALLY FOUND IT, THANKS
ty man you realy are the gaot
thanks bro im late but this is fast easy and awesome!
FINALLY ALRIGHT HERES A SUB
Legend.
thanks u so much i've been finding dizz
Thanks for the video.
thx
Thanks alot
Tysm bro
So simple wonderful
THANKS FOR THE VIDEO NOW I MADE A GAME !!!!!🎉🎉🎉
Congrats!!! I'd love to play it!
Thanks would you mind make a tutorial on my game :)
thank you for explaining how the script actually works!
my guy a legend
Its useful thanks!
I saw you in Roblox Studio that was named “NPCTesting”, were you using it for this one?
Yep lol!
THANKS ALOT!!! YOU ARE THE BEST SCRIPTER!!!
YOU GOOD
:)
LIFE SAVER ;)
THANK YOU BRO!!!!
UR THE BEST
omg bro tysm
THANK YOU SO MMMUCH MUCH, MUCH. THIS GONNA BE THE BEST IDEA FOR MONKEY BARS
This is actually great you're a damn legend! Could you also do one on a script to animate a custom mesh?
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!
aint nobody gonna talk about how fast the backflip was like fr tho
THX YOU SO MUCH
how do i play the animation while its anchored?
ty
how to make this like a hitting ground with a effects?
tysm bro!
Tysm!!!
I am banging my head on the wall wondering why it worked for everyone else
BRO FR HOW
you needa put the script in both the script INSIDE humanoid and INSIDE the part and make sure "humanoid" inside your rig has "animationcontroller"
@Osstick ok I'll put 1 in one and copy on into the other
@@Osstickyou fucking lied
@@Cheeser409 yup
Bro u are soooo underrated!!!
can you make it the same but it only able to get on only once? and on a player
I LOVE YOU
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?
How do you make a full on moon animator 2 cutscene play when the part is touched?
sorry but if i place the dummy somewhere else it starts the animation from there but still thanks
I cant even animate a dummy walking 😭 this sh** to hard
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.
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)
@@rustysillyband legend! thank you so much 💪
How do you make it play once, so that if you step on the part again, it doesn’t play
You can either destroy the part right after that, or add a debounce to it.
How would I add debounce?
set debounce to true@@memercleaner
i think so@@memercleaner
this is good and all, but what if im clicking the part?
the thing is i want to make a animation loop while in game
You can either use animTrack.Looped = true, or you can just set your animation to looping while you're creating it.
yeah
How to paly 2 or more animations at the same time by touching the part?
Great Idea!
It worked
00:05
how do i animate 2 rigs at the sime time?
Pls make a version where you can switch if its loopable or not
Where can you find the animationID
print("hello")
roblox studio when into python mode 💀
I used R6 so when touch it it gives me a tool
AMAZING you earned a sub also how do I make it loop forever??
just make the animation be a loop
its a buttion
its in the animation editor
If things were basic like scratch😭