Moved to a new topic, as this one is over-complicated. If Roblox moderators see this, please delete this topic rather than the new one
I made myself a really simply hitbox system by creating an invisible part with a “Hitbox” tag and disabling CanCollide and CanTouch on the avatar parts such as arms etc.
However, even after all this, the legs refuse to not work. They simply collide with the floor and anything you are supposed to die when stepped on, making the hitbox unusable as it’s over the feet height (Lowering it is not an option). I don’t really know if this applies to arms and torso, but it doesn’t apply to the head.
If you know why this happens or have a clue, please tell me.
I might take an hour to answer as I’m leaving to do other stuff right now.
[Edit] A bit more detail of my scripts
--In order to detect the Hitbox collisions, I have a function like this
local function onTouched(hit)
if hit:HasTag(Hitbox) then
--Whatever I'm doing
end
end
part.Touched:Connect(onTouch) --Of course, I connect the event.
-- Not really any other type of scripts are used, since
-- I work with Tags and it's nothing too complicated
Anyways, to those just seeing this, I think this is a pretty basic issue, but I can’t see it since I’m a newbie. Do StarterCharacters mess with this? And where may I find Motor6D
This is getting absolutely no answers… Hey, if I explained something badly, please tell me! I’ll help you help me
An union. Is this a problem? I don’t want to post the entire script here, but it is a system that picks a random union from an array, creates a clone, sets up a few properties and lastly connects to onTouched.
Please don’t get me wrong, the Hitbox itself functions perfectly, but the leg is also colliding, meaning the parts don’t ever touch the hitbox. The head is not colliding and if I bump my head it works, but the legs don’t even though they have CanCollide disabled as well
That kinda ruins the purpose of using the hitbox
I made the whole thing because I thought using the actual body parts gave a bad experience, specially when you die because the animation made the leg go further than expected from a regular jump animation, and overall it felt really clunky.
I will try to follow the 3 basic default questions, because I don’t really think my way of explaining is working.
1. What do I want to achieve?
I want a hitbox system where a hitbox serves as collision instead of the body parts.
2. What is the issue?
The legs are still colliding despite their CanCollide property being false, and I don’t want that. It means the killbricks can’t touch the hitbox above the feet.
3. What solutions have I tried so far?
Setting CanCollide to false via script, as suggested by @Gorber2341. Doesn’t work. if I view the Explorer mid-game, I can see how the property is false yet not actually working like if it was false.
It sets a distance from the ground that the center of the character’s HumanoidRootPart floats above
This could be causing your custom hitbox colliders to be too high above the ground
If lowering that value works as desired but it ends up that you don’t want the default legs to pass through the ground, then I’d still be confused on how to solve this problem