How to MAKE Animations Play When A Part Gets Touched.. (Roblox Studio)
Вставка
- Опубліковано 28 вер 2024
- 🛠Thanks so much for watching, hope you guys have a great day! Subscribe 😎🛠
Animation Tutorial: • The ULTIMATE Beginner'...
😎Subscribe: www.youtube.co...
💬Discord: / discord
🌴Roblox Group: www.roblox.com...
👑Rusty Merch: www.roblox.com...
⌚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 UA-camr that you should Subscribe to :)
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
@@126sxch oOoOooOoOooOoOooOoOoOooO
Player: *touches random part*
Rig: *has a seizure*
Underrated comment🗿
@@hamme871 fr
@@hamme871underrated Icon
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
@@mikeartsyt89_2 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)
OMG DUDE YOU ARE SUCH A LIFE SAVER THANK YOU SO MUCH THIS WILL MAKE MY GAME 10X BETTER!!!!!!!!!
I don’t even make roblox things I just okay it but it’s fun to watch these types of videos!
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!
This is going to be extremely useful.. Thanks!
Glad you think so!
tysm dude this helps a lot you gain a another subscriber.
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
Bro hit the quickest backflip I've ever seen on roblox
love this tysm
I'm glad you like it
THANK YOU MAN. THIS WAS REAL COOL. this tutorial was help my game. THANK YOU (i really found this tutorial 1 week)
love u man helped me 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
thx so much i was searching for this for 3 weeks edit: HOW I GOT THAT MANY LIKES
Player: touches block
Rig: brings the player to the bedroom but the camera don’t follow…
yall got to help me it starts to have a seizure idk what i did wrong T-T anyone know how to do without having it to press on anything and let the animation work by itself really need the help cant find a vid on it
thank you for explaining how the script actually works!
how do i play the animation while its anchored?
thats what im saying
sorry but if i place the dummy somewhere else it starts the animation from there but still thanks
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 :)
FINALLY ALRIGHT HERES A SUB
THANKS ALOT!!! YOU ARE THE BEST SCRIPTER!!!
This still does not work for me. The animation plays without the part but when trying to add the part it does not work. Pls help me
Thanks so much
how to make this like a hitting ground with a effects?
How Do I Make When Player Touches An Part, Which Makes The Animation Play, And Then Freeze The Animation?
BRO THANK U SOO MUCH
I used R6 so when touch it it gives me a tool
Its useful thanks!
how can i make it so you cant do it again?
What animation id? I really don’t understand if someone does please tell me what to do
animation ID is the ID that identifys which animation you are using, when you publish your animation, a number on the screen will pop up there, make sure to copy it
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:
ua-cam.com/video/2KdzgpHIA6s/v-deo.html
Have an amazing day!
How do you make it when ever you click a punch will happen. Like for instance if you click four times four different punch animations will play then there will be like a cooldown once you click four times. Let’s say if you click less then 4 times after some time like 2 seconds it resets and your back to the first punch. (I know it’s a lot but thanks)
The amination only plays for me. when other players try and trigger it it doesn't work. could you help?
And I still can’t find a video of when an animation plays when the part is clicked 😭
I need the same thinggggg
THANK YOU BRO!!!!
Can you make it pause when the animation ends?
thats what i want 2
thx bro but my animation is going too fast can you help me?
You can follow this tutorial here for a simple introduction to animating. At the end, you can even learn how to adjust the speed of your animation through the script! Here it is: ua-cam.com/video/y7_9d-BcgWY/v-deo.html
omg bro tysm
You sound exactly like denisdaily
can i add multiple rigs , like i have a huge animation with multiple rigs
Hey rusty, this doesn't seem to work for me because im using a custom rig, could you help me with this?
Inside the (anim) Do i put the animation ID or the name? Because none of them worked.
You would put the AnimationID inside of the animation.
print("hello")
roblox studio when into python mode 💀
how to make it not repeat, so the animation would go only once
How do I Make it so the Character Deletes after the animation plays
You can simply use:
game.Workspace.Rig:Destroy()
That will destroy the rig if it is inside of workspace. Thanks for watching!
Where the hell do you find IDs to animations
How to make it so that it plays forever without stopping?
You can loop your animation.
I cant even animate a dummy walking 😭 this sh** to hard
but wait how to make it touch it a part that I want to touch because what if you have a lot of parts
how do i animate 2 rigs at the sime time?
"First off"🤠🤓
Bro im not being rude
I love u so much but your voice is just funny LOL
People may say How? HOW IS IT FUNNY" it just is to me which is a compliment bro
I'm glad it makes you laugh lol! Thanks for the encouragement!
just realized how the hell do u connect them
Help guys it doesn't work for me i made my animation and copied the script what do i do ?
How to make a Custcene play when the part touched?
I've got a great tutorial on that! ua-cam.com/video/BYUJNClwD0c/v-deo.html here's the link!
this is good and all, but what if im clicking the part?
is there a script when you click it with a click detector it starts the animation?
A video which need 1B views is this video u know what moatly people really dont knw and they really need the script and toturial ❤😭❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤
if the name of your part is different then change game.workspace.PartName.Touched
What’s the name of this animating app? Plz
how do you do this with moon animator?
How do i make it play once
local anim = script.Animation
local humanoid = script.Parent.Humanoid
local debounce = false
local animTrack = humanoid:LoadAnimation(anim)
game.Workspace.Part.Touched:Connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player and not debounce then
debounce = true
animTrack:Play()
end
end)
Thanks so much for helping!
@@Billy-gm4wl Thanks :)
How to play camera animation after touch part
I've got a great tutorial right here for ya: ua-cam.com/video/BYUJNClwD0c/v-deo.html
How do I see what my animation id is?
what happens when i use moon animator??
bro why i see the animation but my beta testers dont see it?
If you made the game in a group, you need to publish your animation with the creator as your group. Otherwise, if you're sharing a game with someone else, you need the owner of the game to publish and use the animation.
@@rustysillyband i do game in group and publish animation in group but in roblox animation see only me what the problem?
@@rustysillyband Man TYSM i finally do my game i do it 1 years with my team TY!!!!! we do great cut scene
how do you paste your id?????
You can use ctrl + v.
What coding language is it?
Lua.
is there a way to make the animation play once the player holds e on a part?
How do I get the animation id
from where i got id animation?
Make a animation game
LOL that'd be an amazing idea!
@@rustysillyband btw when u fhinish the game sent me link
Where do I find my animation id
how to see two animations at the same time
I should really make this a series 🤔 LOL
How do you copy animation id?
I have just learned right now that Roblox uses python.
Unfortunately not. Roblox Studio uses a custom version of LUA called LUAU.
Is it possible to make it so taht our character does the animation?
Idea: can you do the same thing but when you touch the part a sound plays? ty :))
how to make the easiest basic jumpscare:
not me remaking the batim "boarded up ink machine room" jumpscare
This is literally what i used it for
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
WERE IS ANIMATION ID
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!
Cool! i just want to know how to make the player do the animation
Mee to
I don t know
R u dumb just go to animation editor
Put It into the StarterCharacterScripts
Please one-v-one me in fortnite
My brother has been wanting something like this forever. Thank you for a tutorial that is simple and makes sense 👍
how do I add a Cooldown to the part?
local debounce = 3 --how long the cooldown will be in seconds
local dummy = --your dummy here
local animation = --your animation here
local animator = dummy:WaitForChild("Humanoid").Animator
local animTrack = animator:LoadAnimation(animation)
local part = --your part here
part.Touched:Connect(function(hit)
if game:GetService("Players"):GetPlayerFromCharacter(hit.Parent) and not animTrack.IsPlaying then
animTrack:Play()
task.wait(debounce)
end)
omg i just realized the code doesnt work i am so sorry
I asked my dad since he was a great LUA user, and he said that if debounce = nil then debounce doesn’t have a meaning
Edit: and for the if player and debounce == nil part, then replace with if player then because debounce has no meaning
Edit 2: without the nil, we will have this
local anim = script.Animation
local humanoid = script.Parent.Humanoid
local animTrack = humanoid:LoadAnimation(anim)
game.Workspace.Part.Touched:Connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
animTrack:Play()
wait (1)
animTrack:Stop() - If you want the animation to loop, remove this
end
end)
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?
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
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?
I saw you in Roblox Studio that was named “NPCTesting”, were you using it for this one?
Yep lol!
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
i STILL CANT FIND IT im so confused
Where can you find the animationID
does it work by moon animator
when i touch block it doesnt work...
how can I only 1 play animation
Diamonds mabye dont use with anything :/
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?
You forgot the first step.
First get a PC 😭
It doesn’t work even though I copied it word for word