Make an explosion that wont break welds at body parts

Hello!
I made a simple rocket launcher, but I have a big issue with it.
I want that the explosion that the rocket launcher makes will break the welds of the parts that are in the radius, and it does that good.
But sometimes, the bodyparts of the player who shot it or the tool itself are also in the explosion radius, which will cause them to break welds… and kill the player.

I want to make an explosion that can only break welds at parts that are not the player.
Is it possible? it’s also fine to make all the players in the game resistant to explosions since there is no PvP at my game at all.

		Rocket.Touched:Connect(function(TouchPart)
			if Deboune == false and TouchPart.Anchored == false and TouchPart:IsDescendantOf(game.Workspace) == true and TouchPart:IsDescendantOf(Tool) == false and not TouchPart:IsDescendantOf(Player.Character)then	
				local Explosion = Instance.new("Explosion", workspace)
				Deboune = true
				Blast_Radius = Configuration.BlastRadius.Value
				
				Explosion.BlastRadius = Blast_Radius
				Explosion.BlastPressure = Blast_Pressure
				Explosion.Position = TouchPart.Position
				Explosion.DestroyJointRadiusPercent = 1
				OnExplosion:FireClient(Player, TouchPart.Position)
1 Like

As far as i know, theres no possible way to make an explosion ignore a set of welds. The only way to achieve what you want is to make an explosion for each client, and set the explosions DestroyJointRadiusPercent to 0 for the player who shot the rocket.

2 Likes

Yes, you can make it. And it’s simple. You can just insert ForceField inside the character/model you want to be protect.
It is commonly seen when you spawn at the spawn point. You can disabled the blue shield too.

4 Likes

What do you mean insert forcefield? I dont want the players to have a blue circle all around them, is it possible to make it invisible?

But I want the explosion to not hurt any players at all, not just the one who shot the rocket…

Set DestroyJointRadiusPercent to 0, as documented. It will not break any joints, even the character itself.

1 Like

But I said that I need the explosion to break all welds except the character welds.

Yes you can also make it invisible. I know that you wanted to destroy the building but not character and weapon. This wiki page. You just need to make it as character model’s child.

For example:

>Workspace
    >Araxon
       ForceField
game.Workspace.Araxon.ForceField.Visible = false
4 Likes

Explosion has its own event, Hit, which passes the part that was hit. If you want it to break all other welds, then you can set DestroyJointRadiusPercent to 0 and manually destroy all other welds. When you receive Explosion.Hit, you can loop through the part’s parent’s descendents and break welds.

If you set a forcefield, keep in mind the character would be protected against ALL damage in that instant using humanoid:TakeDamage() and you may have to deal with the humanoid.Health property for taking damage.

1 Like

Your question is directed toward the body parts.

1 Like

Thank you so much, that’s exactly what I wanted, I didn’t know you could insert a forcefield and make it invisible…

Yes I know, right now my game has no PvP at all so it’s fine if player won’t recieve damage at all.

1 Like

Yes, set the Visible property in ForceField to 0

forceField.Visible = false

1 Like

Wow, where has this solution been!! I wish I had seen this last year. Now I can simply add an invisible forcefield to a huge model(which is welded and moving) and all of its welded parts will be protected from explosions!

Thanks!