THE CONCEPT I am trying to make a brickbattle styled game in which your own explosions can't kill you. I'd like to implement this feature so you could manipulate these explosions so that you can use it as a secondary movement option. In the game "Doomspire Brickbattle", the creator of the game, GFink, utilizes this and creates a large majority of different movement options, as seen here and here. WAYS TO DO THIS There are a number of ways to do this, such as making it so all your teammates/yourself get a forcefield for a split second and then destroying it immediately. However, with this it could make attacks from enemies completely nullified. You could however make it so that if your character/teammates are near the bomb/rocket then they will get a forcefield and then it will be removed once the explosion is gone however I have no idea how to do this. If there are any other suggestions that would be great.
COMMUNITY QUESTION
How would I go about in making anti-self-kill detection with explosions?
1 answer
Just make a custom system for damage. By that I mean make a function that'd be in a script on every player called TakeDamage, which would take in the amount of damage as well as the giver of damage. So if the giver was Joe, then it would do
if Joe.TeamScript.Team.Value ~= Parent.TeamScript.Team.Value
and if Joe was on a different team, then it could continue and do something like
Parent.Humanoid.TakeDamage(damage)
So basically, you just need to wrap the pre-existing functionality with your own in order to control it.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
humanod:TakeDamageWithInstance(100, "Explosion")