Hey guys.
I have the following script, and yes, it's an nuke. I want it to detect the parts it touches, but it seems like it only works when I press run, and MOVE a part so it touches it. Only then the script works.
Any help?
nuke = script.Parent.CFrame
for name, child in pairs(game.Workspace:GetChildren()) do
if child:IsA("BasePart") and child.Name ~= "nuke" and child.Name ~= "Baseplate" and child.Name ~= "BasePlate" then
child.Anchored = false
child:BreakJoints()
end
end
script.Parent.Touched:connect(function(cor)
cor.Material = "CorrodedMetal"
wait(3)
cor:Remove()
end)
while true do
script.Parent.Size = script.Parent.Size + Vector3.new(1,1,1)
script.Parent.CFrame = nuke
wait()
end
