My bomb tool is not working

Hi I am new to scripting scripting I have a problem with my bomb script tool to look at the video click link bomb - YouTube heres the code

local tool = script.Parent
local handle = tool.Handle
local debounce = false
local BlastRadius = 10  
local BlastPressure = 10000
local FuseTime = 3  
local cooldown = 5  



tool.Activated:Connect(function()
	if not debounce then
		debounce = true
		local bomb = handle:clone()
		bomb.Parent = workspace
		bomb.Position = handle.Position
		bomb.CanCollide = true
		bomb.Fuse:Play()
		handle.Transparency = 1
		delay(FuseTime,function()
			local explosion = Instance.new("Explosion",workspace)
			explosion.Parent = bomb.Position
			explosion.BlastRadius = BlastRadius
			explosion.BlastPressure = BlastPressure
			bomb:Destroy()
		end)
	end
	wait(cooldown)
	handle.Transparency = 0
	debounce = false
end)

The problem I see is at exploison.Parent = bomb.Position, you set the parent of the exploision to workspace in Instance.new("Exploision",workspace) and then you are trying to parent it to a vector value. This should fix it:

            local explosion = Instance.new("Explosion",bomb)
			explosion.BlastRadius = BlastRadius
			explosion.BlastPressure = BlastPressure
            explosion.Position = bomb.Position
            wait(0.3) -- so the exploision plays
			bomb:Destroy()
1 Like

ok i will try it thx right now thx

I editied the script above, cause I forgot to add exploision.Position = bomb.Position, if you add that, it should be fine

1 Like

ok thx i will try it right now

thank you it works thx for helping me

1 Like