create Folder in workspace and rename folder for “Ignore”
create “Part” and move it to “ServerStorage” and rename part to “HitBox”
Part Settings:
CanColide=false
Anchored=true
Size = 0,0,0
transparency=1
Using HitBox Script:
local Debris = game:GetService("Debris")
local destroyHBtime = .01
local Player = game.Players.LocalPlayer
local Character = Player.Character
local hitBox = game.ServerStorage:FindFirstChild("HitBox"):Clone()
hitBox.Size = Vector3.New(6,6,6)
local currentOffset = Character:GetPivot()
hitBox:PivotTo(currentOffset * CFrame.new(0,0,-2.5))
hitBox.Parent = workspace.Ignore
Debris:AddItem(hitBox,destroyHBtime)
local hitBoxOverlapParams = OverlapParams.new()
hitBoxOverlapParams.FilterType = Enum.RaycastFilterType.Exclude
hitBoxOverlapParams.FilterDescendantsInstances = {workspace.Ignore, Character} -- hitbox ingore
local hitsParts = workspace:GetPartsInPart(hitBox, hitBoxOverlapParams) -- hits
local alreadyHits = {}
if #hitBox ~= 0 then
for i,v in hitParts do
local humanoid = v.Parent:FindFirstChild("Humanoid")
if humanoid then
if not table.find(alreadyHit,humanoid) then -- if hit then
humanoid:TakeDamage(10)
table.insert(alreadyHit,humanoid)
end
end
end
end
I am pretty sure this wouldn’t work too well, did you even test this before posting it?
The system is completely Client Sided, which means it wont actually do any damage to anyone, it will just look like it.
Posting things like this that don’t truly work as intended isn’t really a good idea. (Unless its supposed to be like a half challenge or something, that still wouldn’t make too much sense to post as a Community Resource however.)