Raycast Hitbox 4.01: For all your melee needs!

Is there a way I could use it for hand to hand fighting, would I need a custom character or could I just use the players avatar

1 Like

u cn use their avatar and in u will need to make 2 parts about the size of their hand weld it to their hands and put a bunch of attachments named DmgPoint in the parts u make then once u have welded and put the part in a tool and then parent the tool into the character. i could make smthg like this for u for free if u want i am bored of big maths rn

Can this module be easily exploited by exploiters? Also is there any things to take notes of when using this module so it does not gets easily exploited?

1 Like

if youā€™re using this module on the server, I dont think it can be exploited

It will be up to the developer to implement sanity checks. This module only takes care of the basic hit detection using raycasting methods. It leaves it open for other developers to do what they need to do without added bloat. You can use this module server-sided which will automatically make it secure, but you leave player experience and responsiveness on the table by doing so.

You can search this thread for my posts regarding sanity checking and security. I left some thoughts for other people in them and it may help you.

1 Like

Hey! Iā€™m running into an issue where the hitbox becomes too inaccurate at <60FPS. Should I try reworking the animation or is there some other solution I can attempt for fixing this? You can see that at 30 FPS, some of the hits in the 5 hit chain miss completely because of the inaccuracy.

Unfortunately, the module relies on framerate to determine positions. Any frames lost in between also means lost locational data. This is designed so it can compensate for lag and increase performance. There is one solution that personally I use myself to counteract this. This may also help you as I have similar animations in my game similar in speed to yours.

I have both this module on the client (to simulate effects and responsiveness) and on the server (to detect actual hit detection). Since the server has a constant replication rate, it does a decent job at detecting hits even if the client is lagging (however still not as accurate as 60 FPS clients). You can also do the Battlefield way where if a client is lagging (under 60 FPS), it switches to server-sided hit detection, and back to client-sided hit detection once they are back to 60.

4 Likes

I ended up doing server-side detection as well before reading your reply, and itā€™s working out pretty well! Red is client, green is server!

Now that I have the basic functionality in, I think Iā€™ll handle effects the same way you are. I might also take a look at the Battlefield method you mentioned. Thank you!

1 Like

Hello, while I was implementing the combat system in my game I noticed that if you stand still and use the raycast hitbox it most of the times doesnā€™t hit. Anyone knows how to fix this problem?

This hitbox requires movement and velocity of the userā€™s hitbox in order to register. If you are standing still, and enabling the hitbox without moving your weapon or person at all, there is no length to speak of for the hitbox to detect. The hitbox requires significant movement for it to be accurate. There is a LinkAttachments function in this module as well which can help your specific problem since itā€™s meant for stationary hitboxes.

Well, itā€™s moving the weapon but sometimes if you stand still when attacking it doesnā€™t detect anything. Oh and, how would I proceed to make the hitbox be able to detect even without movement and velocity of the user.

Itā€™s hard to see what causes it since I donā€™t see where the rays are going (DebugMode turned to true will help me see that). It can be a few problems, like lag or not enough attachments.

Oh, the problem was because there wasnā€™t enough attachments on the sword. I fixed the problem, Thank you for your help!

1 Like

If you donā€™t mind me asking when will you be able to add my module? It is almost fully finished just need to add one featureā€¦

Hello there, I tested this and it seems to be working fine. My problem however is when I play it, the ray only shows up once and not appearing anymore.


local RAYCAST_HITBOX = require(RS.RaycastHitbox)

local newHitbox = RAYCAST_HITBOX:Initialize(script.Parent)



newHitbox.OnHit:Connect(function(hit, humanoid)
    print (hit)
    humanoid:TakeDamage(50)
end)

newHitbox:HitStart()```

HitStart only draws the rays once. Similar to a toggle light switch. Use hitstart() to turn it back on, hitstop() to turn it off.


@rottendogDkR Been quite busy recently so I donā€™t have an ETA, and it also depends on the complexity of your module. Iā€™m currently doing some additions to the RaycastModule which will support bone and mesh deformation so it may take a while.

1 Like

I will be making the complexity of the module more simple but thank you for letting me know.

1 Like

I need help with the module. (EDIT: Donā€™t mind the reply on post, I forgot how to reply to person only)

So, for some reason when I update from RaycastHitboxV2 to RaycastHitboxV3, the Handle3 Iā€™ve created wonā€™t work even though the first 2 will.

Example of the Handle3 still being present in workspace and the error in question:

What line 119 is:

image

The first two work perfectly fine, yet for some reason Handle3 will always error despite each function being set up the exact same as every other handle. I donā€™t understand this error and thatā€™s the only reason why Iā€™ve had to hold back on updating the module. Can you help explain how I could fix this?

image

I think you forgot a capitalzation! V3 removes old coding standards so thatā€™s the only major difference.

1 Like

Hello, is there a way to change the default red lines to something of my own?