Help making hitbox

It is way more common on exploits to see somebody deleting something on their character other than the HumanoidRootPart, since it is based on it the Humanoid behaves and what not. Said exploiters would have to create their own behaviour. But yes, you are right, it would have to be created nevertheless.

Check if the documentation is of any help.
https://developer.roblox.com/en-us/api-reference/function/WorldRoot/GetPartBoundsInRadius

Could it also be possible to use Region3 in this scenario?

It would, however, AFAIK, Region3 is much slower & expensive. Plus, it would be harder to filter. I have not done any sort of benchmarking yet though, so take this with a grain of salt.

Yeah, if you had to constantly update it I can see that being expensive

1 Like

well how would i go about putting my damage script in it?

This function returns an array of instances. You would need to apply your code for each part, looping through them. Remember what I mentioned earlier about the blacklist though.

local parts = workspace:GetPartsInBoundRadius(Vector3.new(0,0,0),5,OverlapParams{MaxParts=false, BruteForceAllSlow=false, CollisionGroup=Default, FilterDescendantsInstances={}})
for i,v in pairs(parts) do
-- check if parts are a players character then add them to a damage table so different parts dont damage them twice
end

I’m not experience with :GetPartsInBoundRadius() though

what is the CollisionGroup=Default what should i put there?

If you have no collision groups in your game, you have nothing to worry about

ok so i should remove it? aaaaaaaa

Leave it, it is for the default collision group

Since you don’t seem to understand them, here is a wiki page
https://developer.roblox.com/en-us/articles/Collision-Filtering

Read up :stuck_out_tongue:

Tryna help as much as I can when I’ve never used it before :neutral_face:

hm, this error came up

image

something about this line

local parts = workspace:GetPartsInBoundRadius(Vector3.new(0,0,0),5,OverlapParams{MaxParts=false, BruteForceAllSlow=false, FilterDescendantsInstances={}})

Are you filtering anything right now?

Sorry I’m trying to do school and help at the same time :confused:

no what am i supposed to filter?

so are you still struggling with the problem of multiple damages?

Nothing, if you dont want to. However this means you do not need the 3rd parameter of the function. This being said,

local parts = workspace:GetPartsInBoundRadius(PartPosition ,Radius) 

Make sure to replace the two parameters with your values.

I had this problem as well and I fixed it yesterday

I used the table storing method, and it helped. So basically it’ll get the humanoid on the table and then skip it if it’s already in the table.

repeat task.wait()
        local HitTable = game.Workspace:GetPartsInPart(Part, Params)
        for i,v in ipairs(HitTable) do
            local Humanoid = v.Parent:FindFirstChildWhichIsA("Humanoid")
            if Humanoid ~= nil then
                if not table.find(HumTable, Humanoid) then
                    table.insert(HumTable, Humanoid)
                    self.Remote:FireServer(Humanoid.Parent)
                end
            end
        end
    until Destroy == true
1 Like