#I need some help with my hit boxes and ragdolls ;(

1 messages · Page 1 of 1 (latest)

dark pecan
#

they move but they don't fall over, and the hit boxes are so weird and the last one is really big

#

hitbox script

dark pecan
#

we gotta get the ball rolling somehow

dense lake
dark pecan
#

its like both

dense lake
#

Nuh uh

#

Only learning

dark pecan
#

I tried to make them myself... that didnt work so I went to AI

#

arent you like prestige master or wtv? you here to help or troll?

lilac forge
dense lake
dark pecan
#

coo

dark pecan
#

I have much to learn..

proven runeBOT
#

studio** You are now Level 2! **studio

tawdry spear
#

ai slop ❤️‍🩹 ❤️‍🩹

tawdry spear
pallid pier
#

hi i have similar combat. Heres my hitbox script

local function hitbox(combo, style)
local hitbox = Instance.new("Part")
hitbox.Size = Vector3.new(5, 5, 5)
hitbox.Parent = hrp
hitbox.Transparency = 1
hitbox.Anchored = true
hitbox.CanCollide = false

local params = OverlapParams.new()
params.FilterType = Enum.RaycastFilterType.Exclude
params.FilterDescendantsInstances = {char}

local hitchar = {}

local connection

task.delay(0.1, function()
    if connection then
        connection:Disconnect()
        hitbox:Destroy()
    end
end)

connection = RS.RenderStepped:Connect(function()
    hitbox.CFrame = hrp.CFrame * CFrame.new(0, 0, -2)
    local hits = game.Workspace:GetPartBoundsInBox(hitbox.CFrame, hitbox.Size, params)
    for _, v in ipairs(hits) do
        if v:FindFirstAncestorOfClass("Model") and not table.find(hitchar,  v:FindFirstAncestorOfClass("Model")) then
            local targetchar = v:FindFirstAncestorOfClass("Model")
            local targethumanoid = targetchar:WaitForChild("Humanoid")
            if targethumanoid == nil then return end
            table.insert(hitchar, targetchar)
            if char:GetAttribute("Stunned", true) then return end
            vfxfunc(targetchar)
            AttackHandler:FireServer(combo, style, targetchar)
        end
    end
end)

end

#

basically the hitbox is something called GetPartBoundInBox and the hitbox part is just a reference for the getpartboundinbox to follow.

#

the hitchars = {} is a table to store all the hitchars so they dont get hit again once hit

#

params are used to exclude the players char so they dont get hit

#

and its put in a renderstepped(Runs the code every frame, it also can only be used client side, heartbeat is the alternative for serverside but its "slower") to keep checking if something is in the bound box aka the hitbox, and if it's a model with a humanoid, if its just a model with no humanoid then it returnds end which basically ends the script