#Player Hitbox help

1 messages · Page 1 of 1 (latest)

nova pond
#

for player hitboxes, is it better to create custom hbs around the players character and then check if that hb is a player hitbox or just use if part is a part of a character e.g if part is right arm inside hb then deal dmg

drifting forge
drifting forge
#

are probably better

#

and would make the combat

#

way easier

#

but you could use arm hitboxes too ofc

#

it depends on you

#

both are good options

nova pond
#

i appreciate that

fickle bough
#

Yea custom HBS

nova pond
#
local replicatedStorage = game:GetService("ReplicatedStorage")
local players = game:GetService("Players")
local ss = game:GetService("ServerStorage")

--//Assets
local playerHb = ss.Assets.PlayerHitbox


game.Players.PlayerAdded:Connect(function(player : Player)
    
    
    player.CharacterAppearanceLoaded:Connect(function(character : Model)
        
        character:SetAttribute("Blocking", false)
        character:SetAttribute("Attacking", false)
        character:SetAttribute("ComboEnded", false)
        
        local humanoid = character.Humanoid
        local hrp = character.HumanoidRootPart
        
        
        local clonedHb = playerHb:Clone()
        clonedHb.CFrame = hrp.CFrame

        
        local weld = Instance.new("WeldConstraint")
        weld.Enabled = true
        weld.Part0 = hrp
        weld.Part1 = clonedHb
        
        
        weld.Parent = clonedHb
        clonedHb.Parent = character
        
        

    end)
end)


supple obsidianBOT
#

studio** You are now Level 3! **studio

nova pond
#

ive got this so far

#

creates and welds a hb around the player char

#

is it too small tho

drifting forge
#

instead of giving

#

every player a hitbox

#

you could make it so when the player attacks

#

give them a hitbox infront of them

nova pond
#

before i was thinking of checking if the part inside an attacking hb was part of a character, but is it better to check if the part is a player hb then deal damage?

#

do i just scrap the player hb

drifting forge
#

uhh

drifting forge
#

when a player is attacking

#

you can place a hitbox infront of them

#

and check if anything

#

touches the hitbox

#

if did, check if its a player

#

then yk the rest

nova pond
#

but you recommend that over each player having a hb?

drifting forge
#

yeah

#

thats what i usually do

nova pond
#

👍

#

thanks