I am using the pre made time bomb roblox has to offer us, I am modifying it so the owner is not able to kill himself. However it is not working as intended, when I test this out yes the owner doesn't have its limbs blown out or is killed but neither is anybody else. How could I make it where only the owner is safe from the explosion?
local Tool = script.Parent
local vCharacter = Tool.Parent
local vPlayer = game.Players:playerFromCharacter(vCharacter)
function blowUp()
local sound = Instance.new("Sound")
sound.SoundId = "rbxasset://sounds\\Rocket shot.wav"
sound.Parent = script.Parent
sound.Volume = 1
sound:play()
explosion = Instance.new("Explosion")
explosion.BlastRadius = 12
explosion.BlastPressure = 1000000
explosion.DestroyJointRadiusPercent = 0
explosion.Hit:Connect(function(part, distance)
local hum = part.Parent:FindFirstChild("Humanoid")
if hum ~= vPlayer.Humanoid then
hum:TakeDamage(100)
explosion.DestroyJointRadiusPercent = .5
end
end)

2 comments
OMG....
what is this bad code