Seems like errors get eaten in the OnHit:Connect callback (making it difficult to debug)
Here’s an example where I explicitly throw an error in the callback:
RaycastHitboxNoError.rbxl (43.0 KB)
Seems like errors get eaten in the OnHit:Connect callback (making it difficult to debug)
Here’s an example where I explicitly throw an error in the callback:
RaycastHitboxNoError.rbxl (43.0 KB)
The module looks great! I’ve run into a problem, however, and I’m unsure of how to fix it.
I used your intermediate tutorial to make hitbox points along my character’s arms for a punching attack activated whenever “E” is pressed. The script on my end works fine, however, I get this error from the Vector3 script in the module.
Here’s the line the error stems from.
I imagine a possible reason for this error is because my script is a local script in StarterGui, but again, I’m unsure. Please let me know if you have any solutions to this error!
EDIT : Nevermind, it works fine! I corrected a mistake with what I set the hitbox points to and the problem is gone.
Well done! Works perfectly for punching/kicking which I had first worried about and is a great way to start of your own customized Raycast Hitbox script.
Suppose I’ve created a part and I create a hit-box using a script parented to this part, and I later destroy the part with :Destroy(), do I need to disconnect OnHit when I do that or does the module handle this for me automatically?
I’m wondering, does this compatible with the leaderboard script? (making creator value)
because my melee that use raycast hitbox v4 does not work with the leaderboard script, i tried using creating creator value like the normal weapon did, but it still doesn’t work. but the leaderboard script work with classic sword and etc. im pretty sure it the melee problem not the leaderboard.
Been having quite a bit of trouble with this lately, Im trying to figure out how I can blacklist Accessories from being hit. because im checking which Limb gets hit to deal damage, which can cause issues with players that have lots of hats. Any ideas?
You can make a for i,v loop to get every accessories in the workspace.
local GetTable = {}
for i,v in pairs(workspace:GetDescendants() ) do
if v:IsA("Accessory") then
table.insert(GetTable,v)
end
end
local Params = RaycastParams.new()
Params.FilterType = Enum.RaycastFilterType.Blacklist
Params.FilterDescendantInstances = {} -- put the getTable instead of a new table
Thanks! works great for what im doing
I meant to put GetTable on the Params.FilterDescendantInstances
part unless you already knew that but just in case.
yeah, did that and it works. Thanks
I have a sugestion: add teams management to the hitbox, it will make it more abrangent and less user-code dependant, so it would automatize raycast params and groups based on the setted teams relations.
Sometimes the OnHit function just doesn’t register. Here’s a vid of it happening quite a few times:
https://gfycat.com/playfulviciouskakarikis
I thought I might have too few DmgPoints but adding more doesn’t seem to fix it sadly.
Anyone know why? How can I fix this?
Hey there. I would like to ask a question.
Recently I have seen a similar but different module. ClientCast - A Client-based, Idiosyncratic Hitbox System! Are there any differences between using these modules? I would love to know which one is better for my use case.
If you want to know I am making a client sided raycast hitbox and then sending whether or not the client hit another player or not.
After doing that I then do some simple Direction and Distance checks to see whether or not the player is in front of the enemy and damage the enemy if it is.
So, how are they different?
Thanks
I just tried them both so I’ll give you my opinions.
RaycastHitbox appears to be much more user-friendly because it takes into account many miscellaneous things and lets you skip all of that stuff, focusing on what you really wanna code. For instance, it has built-in humanoid debounce and doesn’t require you to even take a glance at raycastparams if you don’t wanna. The one issue I’ve found with it is quite a dealbreaker imo: it doesn’t seem to register hits all that often.
ClientCast lacks the many intricate features that RaycastHitbox has at its disposal, but it does get the job done. Additionally it can be client-side if you’re brave enough to do some good “sanity-checks” to stop player exploits - though you can also just set to server-side by default, which is cool. Unfortunately, I had to create my own collision debounce system because without it, it dealt damage on humanoids multiple times per attack. However, once I implemented it, it was much more consistent in collision than RaycastHitbox - I never ran into the issues that I had with RaycastHitbox not registering enemies sometimes.
Overall, I think ClientCast requires more setup because it doesn’t have many default properties that RaycastHitbox has… but personally it seems to have more reliable hitboxes so I will probably stick with ClientCast than this.
As a side note, I’m not sure why they act so different in detecting collision because they both probably use the exact same features of raycasting, but ¯\_(ツ)_/¯
I seriously doubt the hitboxes are different. Although I guess it’s technically possible I don’t see how it would be.
Hi, just came back from a long break, sorry to hear the module isn’t working quite as well for you. Appreciate you taking the time to outline the differences between raycast modules for others to decide on! Seems like your set on another hitbox solution but if possible, it would be appreciated if I can get a repo file of that sword + any code that contained the inaccurate OnHit so I can see if it’s something I can improve on.
Thanks.
Hiya, owner of ClientCast here.
The reason that ClientCast does not offer any built-in methods is because there is no “one-size-fits-all” solution; I do not provide any custom debounces or filtering in the module directly to allow for the developer to have as much customizability as possible - ClientCast is designed with minimalism & maximum customizability in mind. You can see it stated on the thread, too:
Overall, I believe that this module is more useful for beginner programmers than ClientCast; it offers a lot of built-in features that you mentioned, which also becomes the downfall for more professional programmers.
Absolutely - here’s an in-depth demo place I made for you to look around (uncopylocked ofc).
You can switch between both RaycastHitbox and ClientCast modules to see for yourself what I mean by ClientCast being slightly more reliable in collision.
Also there’s an option to move your player to a specific CFrame that I found to be a bit buggier than others, but but you can move around yourself in any angle you’d like as well.
Also, it’s worth to note that I did personally try switching to PartMode and Bypass (implementing my own humanoid debounce in the process) but I ran into the same problems as it did for Default mode (i.e. OnHit event not firing at all sometimes). The place below is set to Default mode:
https://www.roblox.com/games/7478862830
Lemme know if there’s any issues with this place / if you need any additional explanations!
I am having the same difficulty to save time here is a shot of my Explorer panel. I have tried many things to get this to work but no luck. I have found that it ‘appears’ to not be creating the destination Vector3 values for the raycast in the Attachments solver. But that may just be misleading.
Hello, I have no experience using raycasts and thats why I decided to use this module, But I have encountered an issue, This video shows the issue ive encountered Weird Raycast Glitch - YouTube
I installed the module just like the website said so but for some reason my raycast does not appear to be positioned on the attachment for some reason, But for some other reason this unequipped tool appears to not have the issue, Theres also nothing on the output related to it, I need help, I have been trying to find a solution to this but I can’t.