Do I need to put hitbox on player or put it on skill?
if on player It have problem on region3 that won’t rotate. Also please show me script example if you have.
Thank for helping
Do I need to put hitbox on player or put it on skill?
if on player It have problem on region3 that won’t rotate. Also please show me script example if you have.
Thank for helping
You could use Rotated Region 3 Module for rotated Region3s.
Or you could use a part with CanCollide false, if you use a special trick to get it to work.
What is this get touching part use for?
Can you elaborate? Your post seems a bit vague.
If you are looking for a way to produce a hitbox system, consider this:
CanCollide
to false
and Transparency
to 0
.CFrame
to the player’s HumanoidRootPart’s CFrame. If you want the hitbox part to be a bit lower or higher you can use CFrame.new()
.WeldConstraint
and set Part0
to the hitbox as well as Part1
to the HumaniodRootPart. This will ensure that the hitbox stays with the player’s movement.If you want to get everything inside this hitbox, you can simple do:
local connection = Hitbox.Touched:Connect(function() end)
local results = Hitbox:GetTouchingParts()
connection:Disconnect()
Of course, Hitbox
would refer to your hitbox part that was created. As for results, it’s everything inside and touching the hitbox, including the player’s HumanoidRootPart and limbs. You can make a simple function to ignore the player’s own body if you want to by doing:
function getPartsInHitbox(results)
local tableToReturn = {}
for _, result in pairs(results) do
if not result:IsDescendantOf(character) then
table.insert(tableToReturn, result)
end
end
return tableToReturn
end
getPartsInHitbox(results) -- returns everything inside the hitbox without the player's limbs