Raycast Hitbox 4.01: For all your melee needs!

It would be efficient and smooth for both the client and the server, but you would need to perform checks to make sure the player isn’t hacking. It would be like sending a remote everytime an action is performed like swinging then if they hit someone it has to be while the server sees them swinging, and also compares positions to make sure they’re actually near the player

1 Like

I see, thank you so much! I will implement immediately

any idea why my hitbox is a million miles away when i set it to my viewmodel’s hitbox.

is the viewmoedl set with position or cframe? and is it client sided or serversided

1 Like

set with cframe, its client sided. could setting its cframe mess it up?

sometimes it randomly fixes itself completely… especially when i sit afk for a while.

how did you set up the attachments since this stuff fixed for me when i swapped to cframe

the attachments are in a mesh in a tool, and the tool is inside the viewmodel.

tool gets equipped by viewmodel every equip. and its a clone of the tool currently equipped (cloned once and cached for reequips, and keeps same hitbox)

image

Is there anyway to destroy connections? if on equip I create a new raycast and have

self.NewHitbox.OnHit:Connect(function(_, humanoid)

then when I unequip I just do

self.NewHitbox = nil

unsure if connection still there, thus constantly equipping/unequipping would create a ton of connections

1 Like

you wouldnt of had to do that since it makes a new hitbox with the same variable so it basically just clears

1 Like

robloxapp-20240116-1741368.wmv (2.9 MB)
i noticed there is a delay between the swing location and hitbox casting
is there anyway to prevent that delay?

3 Likes

Is there any benefit to using this over region3s? I’m trying to create a simple fist combat system and I’m noticing that when I create a single attachment on the hands or legs of the players character, I have to manually go in and set the position of these attachments. When I’m trying to create combat that flows and I have to manually add a dozen attachments to the arms or legs because I can’t change the size of the hitboxes, it feels incredibly tedious, especially given that the animations I’m using change what part of the player’s body is attacking, meaning that I have to change the attachments for each m1 depending on the animation, making this whole process pretty annoying and I seen no reason to use this over region3s which are as simple as creating 1 bound box and then your good to go.

1 Like

Hey’o - I’ve recently made a PR for Raycast Hitbox! PR essentially just adds the raycast-hitbox package to Wally, would be AWESOME if you could give it a review when you’re next avaliable :smile: - no pressure though!

2 Likes

I have a part which is replicated on the client and when I try to create a hitbox, it returns nil upon using RaycastHtbox.new(part).

2 Likes

Forgive me for asking as I haven’t checked myself if anyone else has asked, but does this actually require attachment points to work?

1 Like

Dores this use some kind of lag compensation? Was making my own raycasts but i think it will probably either allow hackers or lag the game depending on where i want the hit to be detected

1 Like

make it client sided
it should work well

1 Like

anyone know what’s causing this and how to prevent it??

1 Like

Hey how you make the hitbox client sided, I am encountering the same issue. Please help

1 Like

What’s the issue? I can’t tell from the video

2 Likes

I think the range in which hes hitting the npc is very far

1 Like