Everytimes i touch my bomb, the output says : 18:34:38.972 - attempt to call a userdata value
Here is the code :
function Bomb(part) if part.Parent:FindFirstChild("Humanoid") then local BB = Instance.new("Explosion") BB.ExplosionType = Enum.ExplosionType.CratersAndDebris BB.Parent = workspace BB.BlastRadius = 20 BB.Position = Vector3.new(Bomb.Position) BB.BlastPressure = 500000 BB.Name = "Explosion, Bomb" BB.DestroyJointRadiusPercent = 0 end end Bomb = game.Workspace.Bomb Bomb.Touched:connect(Bomb)
function Bomb(part) if part.Parent:FindFirstChild("Humanoid") then local BB = Instance.new("Explosion") BB.ExplosionType = Enum.ExplosionType.CratersAndDebris BB.Parent = workspace BB.BlastRadius = 20 BB.Position = part.Position BB.BlastPressure = 500000 BB.Name = "Explosion, Bomb" BB.DestroyJointRadiusPercent = 0 end end game.Workspace.Bomb.Touched:connect(Bomb)