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)
Look on line 2, you are defining that the owner is the tools parent, which is the local player. But since you are not adding any arguments it assumes that everybody has a player, replace it by doing an if else statement checking the player id.