Bomb is not doing knockback

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I want to make a custom bomb that knockbacks humanoids
  2. What is the issue? Include screenshots / videos if possible!
    The knockback aint knocking back
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I have, just found things about direction
    After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
local ball=script.Parent
task.wait(2)
ball.Anchored=true
ball.CanCollide=false
for count = 1,10 do

	ball.Size=Vector3.one*1.25
	task.wait(0.5/count)
	ball.Size=Vector3.one*2
	task.wait(0.5/count)
end
ball.Size=Vector3.one*10

ball.Touched:Connect(function(hit)

	assert(hit.Parent:FindFirstChild('Humanoid') or hit:FindFirstChild('Humanoid'),'hehee')
	
	local direction : Vector3 = -(ball.Position - hit.Parent.PrimaryPart.Position).Unit
	hit.Parent.Humanoid:TakeDamage(3)
	print(hit.Parent)
	
	hit.Parent.HumanoidRootPart:ApplyImpulse(direction*1000)
end)
task.wait(0.3)
ball:Destroy()

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

Instead of hit.Parent.HumanoidRootPart:ApplyImpulse(direction*1000), use a BodyVelocity or something.
replace that line with the following (i hope it works.)

local mover = Instance.new('BodyVelocity')
mover.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
mover.Velocity = direction * 1000 --ball.CFrame.LookVector ehhhh
mover.Parent = hit:WaitForChild('HumanoidRootPart')

game:GetService('Debris'):AddItem(mover,(1/45))
1 Like

i heard body movers are deprecated which is why i’m doing it this way. thanks for your advice though! I just wanted to know why the knockback was not happening