So I want or try to remake classic bomb. Just want find out how peoples make this?
local tool = script.Parent
local sound = script.Parent.Handle.ticking
tool.Activated:Connect(function()
tool.Parent = workspace
sound:Play()
task.wait(3)
local explosion = Instance.new("Explosion")
explosion.Position = script.Parent.Position
explosion.Parent = game.Workspace
local destroyJointRadiusPercent = 1
explosion.Hit:Connect(function(part, distance)
if distance <= destroyJointRadiusPercent * explosion.BlastRadius then
if not game.Players:GetPlayerFromCharacter(part.Parent) then
part:BreakJoints()
end
end
end)
end)
Problem is idk how to attach explosion to handle? And if explosion hit some player he get health = 0