Hey loved your video very informative. I have a question tho so say i wanna detect certain body parts if the hitbox touches the right arm it sets it on fire the problem that i am having is even if it touches the left arm it still sets the right arm on fire. How do i get around this i'm fairly new to scripting.
thank you! just in case I just wanted to tell you that I was referring to this tutorial (all the scripts from it) not the one for members.@@Knineteen19
Thanks, that means that I don't need to give you credits, right? I'm sorry if it's a bit annoying to ask you I'm a bit confused because I didn't really understand one thing and I don't want to get into trouble. Also thanks for all the responses!@@Knineteen19
Well that's how the functions work by default. :GetPartBoundsInBox(), :GetPartBoundsInRadius(), and :GetPartsInPart() all return a table of the parts that collide with whatever given shape or part based on which function you use. If you want to check if a SPECIFIC part is being touched, then just run table.find(thePartTable, thePart) and see if it returns anything other than nil. "thePartTable" in this case is just the result of whichever function you're calling.
Hmm well there's a few ways you could do it. It kind of depends on the projectile itself honestly, but if the projectile is fairly small and moves fast enough that using something like spatial query (on a loop) would miss some collisions, then you could look into how this open-source module does things: devforum.roblox.com/t/raycast-hitbox-401-for-all-your-melee-needs/374482 I have a system of my own that's inspired from the same method that I use for hit detection for small, moving things, since it works a lot better and is much less likely to miss collisions for something moving relatively fast.
Here's the documentation answer: create.roblox.com/docs/reference/engine/classes/BasePart#CanQuery It's basically like the cancollide or cantouch but for raycasts and the overlap functions that this video covers. If you turn off cancollide, canquery, cantouch, and turn on anchored, then you basically completely remove all physics from an object, which can be useful for reducing the lag of special effects that you don't want interfering with raycasts and whatnot anyway.
Are all of the parts inside the same parent and/or ancestor? If so, you could potentially create an empty table, loop through GetChildren() or GetDescendants(), and then add items to the empty table using table.insert() if they have a certain name. Then afterwards, you could set the params.FilterDescendantsInstances property to that table. Also sorry for the late response.
Ahh okay, so that's because in that part we've defined the "radius", which is half of the "diameter" of a sphere. The size property, however, is more like changing the "diameter" as opposed to the "radius", so we multiply the radius by two. Multiplying the whole Vector3 by 2 is just a shortcut for multiplying each individual value.@@kingnoob7450
this has gotta be top 1 best tutorials I've ever seen tysm bro
I'm glad I could help!
This is the best explaination I've ever seen! ty so much
this was actually a really good and informational guide that answer pretty much every single question i had. thanks!
Glad it helped!
Thank you! Even if youre not a beginner this is a really good refresher for these functions
this is the best hitbox tutorial video I have came across and I have watched quite a few thank you for your time.
Glad I could help!
@@Knineteen19 Why does it hurt me as well? Should I separate it by using a module script?
@@aux2970 Before the humanoid takes damage just make a line of code where it checks so that if the characterlist is your name then it returns
perfect tutorial everything is clear and every thing that is need is said perfectly nice one mate
Glad it helped!
thank you bro! was able to complete my fighting game because of you!
I thought this wouldn't be as good as other hit boxes but this video surprised me. Great work!
Good video, that makes things easier for creating hitboxes.
Best tutorial on hitboxes, you helped me so much. Keep it up, great work Man :D.
Best scripter so far
Have you seen PopartNoahh
I've been using touched my whole life what kind of sorcery is this
amazing tutorial, tysm
I'm glad you enjoyed it!
thank you good video. i will just have to watch it 4 times at 0.25 x speed which is not the end of the world
Wow never knew about this. I always just used Touched but that always seemed to be slow and not accurate at all.
Very useful for making a button simulator, as the player stands on a button forever.
who tf would play that
@@RaS-r8q Thousands of people every day 🤯
Hey loved your video very informative. I have a question tho so say i wanna detect certain body parts if the hitbox touches the right arm it sets it on fire the problem that i am having is even if it touches the left arm it still sets the right arm on fire. How do i get around this i'm fairly new to scripting.
Im using GetPartBoundsInRadius for this
Thanks
seeing this man start typing out task.wait() and then replace it with wait() made me freak out
how would i filter it to only detect a humanoidrootpart
I like this video.
bro how come your table prints out whats actually i the table? mine prints out "table: 278374Bxdj and some random numbers and letters"
Nice tutorial! I just have one question, do I need to give any credits for using the script you made in the tutorial?
Nah, you're good either way.
thank you! just in case I just wanted to tell you that I was referring to this tutorial (all the scripts from it) not the one for members.@@Knineteen19
Alright, yeah, thanks for making sure.@@Kirachorizo
Thanks, that means that I don't need to give you credits, right? I'm sorry if it's a bit annoying to ask you I'm a bit confused because I didn't really understand one thing and I don't want to get into trouble. Also thanks for all the responses!@@Knineteen19
Yeah you don't need to.@@Kirachorizo
question: is this possible without a physical hotbox? like lets say i have a table of positions and i want to get the positions in a certain range.
How do you make it not show the table with numbers and letters?
How do i make it detect if only a part (no characters) touches it?
Well that's how the functions work by default. :GetPartBoundsInBox(), :GetPartBoundsInRadius(), and :GetPartsInPart() all return a table of the parts that collide with whatever given shape or part based on which function you use. If you want to check if a SPECIFIC part is being touched, then just run table.find(thePartTable, thePart) and see if it returns anything other than nil. "thePartTable" in this case is just the result of whichever function you're calling.
Do you know how you can make a hitbox for your projectile? I'm not able to find a hitbox/AOE tutorial for Projectiles.
Hmm well there's a few ways you could do it. It kind of depends on the projectile itself honestly, but if the projectile is fairly small and moves fast enough that using something like spatial query (on a loop) would miss some collisions, then you could look into how this open-source module does things: devforum.roblox.com/t/raycast-hitbox-401-for-all-your-melee-needs/374482
I have a system of my own that's inspired from the same method that I use for hit detection for small, moving things, since it works a lot better and is much less likely to miss collisions for something moving relatively fast.
Ayee
quick question, what does “CanQuery” do?
Here's the documentation answer: create.roblox.com/docs/reference/engine/classes/BasePart#CanQuery
It's basically like the cancollide or cantouch but for raycasts and the overlap functions that this video covers. If you turn off cancollide, canquery, cantouch, and turn on anchored, then you basically completely remove all physics from an object, which can be useful for reducing the lag of special effects that you don't want interfering with raycasts and whatnot anyway.
thanks bro!@@Knineteen19
Just a question, how would you have multiple parts of the same name excluded using FilterDescendants Instances
Are all of the parts inside the same parent and/or ancestor? If so, you could potentially create an empty table, loop through GetChildren() or GetDescendants(), and then add items to the empty table using table.insert() if they have a certain name. Then afterwards, you could set the params.FilterDescendantsInstances property to that table.
Also sorry for the late response.
True, I figured it out anyways using if statements@@Knineteen19
W vid
btw i have a question, why did you multiply the part's size by 2?
At what part? Do you mind posting a time stamp?
@@Knineteen19 3:33
Ahh okay, so that's because in that part we've defined the "radius", which is half of the "diameter" of a sphere. The size property, however, is more like changing the "diameter" as opposed to the "radius", so we multiply the radius by two. Multiplying the whole Vector3 by 2 is just a shortcut for multiplying each individual value.@@kingnoob7450
@@Knineteen19 oh okay, thank you!
could you post the script?
You can gain access to the studio files for $2.99/month by purchasing the lowest membership option.