At the moment, my hitbox finally works after all this time, I decided to scrap the RotatedRegion3 module for a small amount of time and build my knowledge on regular Region3 allowing me to make an actual working hitbox, but there were a few issues. When I did a hit, I’d instead only get damaged, and at death the issue would be AnimationProvider would bug out.
At the same time the combat would play even you are dead.
That dummy will need to be compatible with how you’re dealing damage. You’ll also need to exclude the BasePart instances of the player’s character which created the damage box.
Make a function to detect when he dies and make it destroy the hitbox/combat instance you using to deal damage
plr.Character.Humanoid.HealthChanged:Connect(function()
for i,v in next,plr.Character:GetDescendants() do
if v:IsA('Part') and v.Name=='HitboxDmg' then
v:Destroy()
end
end
end)
Some like that
I’ll test this right now, but the issue I seem to have as well is the AnimationProvider stopping the combat completely, once I respawn for some odd reason. Do you know anything about that possibly?
These scripts are inside the starterpack and once I respawn it’ll just abruptly not work no matter how much I click. I have a similar issue with my fireball where once you respawn the same thing will happen, but the function will still work.
I actually dont know what you using to deal damage, its just a example of what you need to do, basically remove the instance thats deal the damage when the ply die
if Action == ("Combat") then
local HitBox = HiBo:Clone()
HitBox.CFrame = Character.PrimaryPart.CFrame * CFrame.new(0, 0, -3)
local Welds = Instance.new("WeldConstraint", Character.PrimaryPart)
Welds.Part0 = HitBox
Welds.Part1 = Character.PrimaryPart
HitBox.Parent = workspace
local pos1 = HitBox.Position - (HitBox.Size/2)
local pos2 = HitBox.Position + (HitBox.Size/2)
local Re3 = Region3.new(pos1, pos2)
local HBFinder = workspace:FindPartsInRegion3(Re3, HitBox, 20)
Debris:AddItem(HitBox, 0.3)
for i, parts in pairs (HBFinder) do
if parts.Parent:FindFirstChild("Humanoid") and parts.Parent ~= Character then
print(parts.Name)
elseif parts.Parent == nil then
return parts
end
end
if HBFinder.Name == Character.HumanoidRootPart and HBFinder.Name ~= Character then
return HBFinder.Name
elseif HBFinder.Name == HumanoidRootPart or HRP then
Humanoid:TakeDamage(5)
end
Player.Character.Humanoid.HealthChanged:Connect(function()
for i,v in next,Player.Character:GetDescendants() do
if v:IsA('Part') and v.Name =='CombatR3' and Player.Character.Humanoid.Health > 0 then
local Combatr33 = v.Name["CombatR3"]:Clone()
Combatr33.Parent = workspace
v:Destroy()
end
Although it does absolutely nothing for some odd reason. Not even delete the script if I’m dead.
Used my brain a little and used the Died Function. Basically, I checked if the Humanoid died and just Disabled the main script/combat script until the character respawned.