That’s exactly the system that is being implemented. I will need to follow up with the other developer helping me implement it to RaycastHitbox before I do so but it does that with a resolution setting.
Unfortunately, I don’t have a function right now that I can give you
I already have an attachment in my melee weapon called grip, it grips the weapon somewhere, wouldn’t grip be placed in the hitbox therefore every attachment in the tool is a hitbox?
The module only searches for attachments with a given name. Default is “DmgPoint”. You can change this in the script. The attachment name “Grip” isn’t “DmgPoint” so it won’t be part of the hitbox.
Check the main post for 4.01, it has a date on it. Redownload it just in case.
Search this thread on sanity checks. I went over numerous examples with numerous developers about it. It’s not exploitable if you make your checks bullet proof.
Hi, trying to set up a blacklist and I receive the error: Argument 1 missing or nil
When I click to go to the code it appears to be complaining about ‘newHitBox’(see code below) which makes no sense:
local newHitbox = RaycastHitbox.new(Handle.Mesh)
newHitbox.RaycastParams = RaycastParams.new()
newHitbox.RaycastParams.FilterDescendantsInstances = Player
newHitbox.RaycastParams.FilterType = Enum.RaycastFilterType.Blacklist
with out the Params setup the hitbox is created and works.
No, it only works if you are moving. Raycasts requires distance for it to detect hits. The raycasts does not have a set width and therefore equals to zero distance if you are not moving.
Another developer here used the LinkAttachments function here to circumvent that issue since it allows hitboxes even while stationary.
I have placed the hitbox code into my sword script and it is working ok, but is this a good practice? Should I have the definitions for the hit box in another script so it can be assigned as needed to different weapons and just set a call to the needed weapon script in the script that defines the hitbox?
There really isn’t a “proper” way to use this module. It’s designed to be as easy as possible to fit any project of all sizes. This is general advice but if its readable, convenient, and doesn’t hamper debugging, then it should be fine. Ultimately, as you develop your game further, you will learn yourself what is best practice for how to implement it according to your needs.
I had a quick question. Is there support or features that show the vector 3 point or any offset position relative to the parts hit? The reason I ask this is because I’m trying to detect the position one of the raycast attachments comes into contact with an object so I can put a visual effect at that point. Or even if there’s a way I can get the specific attachment, I can find the point using the world position.