What’s the best way to find the area of a player’s head, for example their jaw, upper left, or upper right after casting a ray and hitting the player’s head.
use comparison < > between and on positions and coordinates of the ray position that was hit on whether it was closer to the jaw, or the upper and others, so basically you would use comparison to detect which area was the closest or nearest to the position of the raycast that hit the head
what do you mean are you talking about the surface area of a player’s head, maybe the volume area of a player’s head
the player’s head is shaped like a cylinder so should the volume of the players head be like math.pi * (head.Size.X/2)^2 * head.Size.Y
he probably meant the parts of the head like the jaw and upper like hes asking “what area was the ray hit on”
could you use a bounding box that is positioned in the middle of the jaw by taking the area of the players head and divide by 4 on the bottom front of the head and whether the bounding box is the instance hit by the raycastresult
im actually encountering similar issues to this topic as of now
sorry if you didnt ask me but you should divide the head into 4 parts, and name them to whatever name you want like the jaw or put parts as placeholders for jaws and upper and other parts and the full explanation is already in the replies in your post
you should listen to what he said and what i said
I have tried this, and it works really well. My only issue is I made bullet wounds for the firearms, and they always get positioned weirdly bc the ray cast is detecting the hit points I made for the head instead of the actual mesh itself. Maybe I can do a second ray cast with params that exclude the hit points for the head, idk.
well you need to divide the mesh also into individual parts and when the raycast hits whatever areas it is on and then detect which face in the mesh or part in the mesh was closest to the raycast hit position and then put it on part position by using comparison <> and Vector3
That sounds like a great idea, although I’m not educated in modeling or working with meshes, any tips on how to divide the mesh, I thought about maybe using unions but I feel like that would be less accurate.
ok sorry i just realized you can’t divide meshes in roblox studio into individual parts
you need to have alot of 3d modeling knowledge to replicate exactly as a mesh head
use this plugin to divide parts
https://create.roblox.com/store/asset/17413489068/part-divider?keyword=part+divider&pageNumber=1&pagePosition=0
credits to the owner of the plugin

