Hey guys, This is my first post so if there is any etiquette I need to take care of I do not know yet. But enough about that, onto my question. I am making a bomb that is generated when you step on a plate. After stepping, the bomb/nuke will generate as a circle and expand. Anything that touches will have BreakJoints() applied. My script is below:
notBeenTouched = true
wait(4)
function onTouch(hit)
if notBeenTouched then
NukeBall = Instance.new("Part", Workspace)
NukeBall.Shape = "Ball"
NukeBall.BrickColor = BrickColor.new("Deep orange")
NukeBall.CanCollide = false
notBeenTouched = false
NukeBall.Anchored = true
for i = 5, 100, 5 do
print(i)
NukeBall.Size = Vector3.new((i), (i) ,(i))
wait(0.1)
end
NukeBall.Transparency = 0.5
wait(0.5)
NukeBall.Transparency = 1
NukeBall:remove()
end
end
script.Parent.Touched:connect(onTouch)
How can I apply the detection for knowing if the bomb is touched and break joints? It would be greatly appreciated. Thanks all!

1 comment
Edited to fix code formatting.