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)
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.
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.
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.
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.
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!