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)

4 comments
Try parenting the explosion to the bomb.
But the explosion would appear at random times, i'm trying to make it explode once you touch it.. Like when i place an explosion in the workspace, the explosion restarts at random moments
What line does it say there is an error on?
It's not showing any line where there is an error