I’m coding a nuke and I want it to turn any part it touches into corroded metal, however it’s only turning very specific parts into metal.
Code:
for i = 1,100 do
wait()
local Parts = script.Parent:GetTouchingParts()
print(Parts)
for i, v in pairs(Parts) do
v.Material = Enum.Material.CorrodedMetal
end
script.Parent.Size += Vector3.new(10, 10, 10)
end
script.Parent:Destroy()