How to make explosion ignore players on team but break welds on others?

Hi there, I am currently working on implemented a team system where other players cannot damage teammates. My only struggle so far has been a specific tool which shoots an explosion at enemies. Does anyone know how I can do this without turning off blast radius and weld breaking?

2 Likes

I’d say remove the blast damage entirely and just make a hitbox(sphere) surrounding a bomb which checks for parts and then if there’s a weld attached to it then destroy it, and then you can use conditions like if the parts parent is a character and the character is in the same team as the other character who dropped the bomb, etc. Im pretty sure there is a way better way of trying to achieve what you want, but I don’t have much context to depend on.

2 Likes

From what else I’ve read this sounds like my best option, hopefully someone else has a solution but thank you.

Hello.
You can get rid of the Destroy Joint Part Radius entirely, but use explosion.hit on anyhting the explosion touches.
If it find first ancestor humanoid then get the parent of the humanoid then ues get player from character on the parent.
Then just use the team to determine if the welds are destroyed or not.
I hope this helps!

1 Like

yep, this way you completely illuminate the need for a hotbox because the explosion instance already provides one.

1 Like