So, I took a freemodel tornado and edited the script so that it wouldn’t pick up my building foundation, but only the structure. I don’t know why, but it just stopped working after that. It worked fine before, then I took a break for a few months and it doesn’t work now. Here is the code:
local sp = script.Parent
repeat
wait()
until sp:FindFirstChild("WhichTornado")
local tor = sp:FindFirstChild("WhichTornado").Value
local bp = sp:FindFirstChild("TornadoSuckingForce")
if not sp.ClassName == "UnionOperation" then
sp.Anchored = false
sp:BreakJoints()
local height = 0
if not bp or sp.Velocity.Magnitude < 2.5 then
script.Parent:WaitForChild("SuckingRotation"):remove()
bp:remove()
end
repeat
bp.Position = (CFrame.new(tor.Position - Vector3.new(0, tor.Size.Y/2, 0))*CFrame.Angles(0,math.pi*2*((tick()/5)%1),0)*CFrame.new(tor.Size.X/2 + height/30, height, 0)).p -- the x will make the parts get farther away from the tornado, and y will make it move up
height = height + (tor.Size.Y/100*0.5) -- aka 2% of it's Y size
wait()
until height == tor.Size.Y -- a very large number but it might fit the looks
bp:remove()
wait(5)
end
No, because Hazard parents SuckingScript to the parts surrounding the tornado. Also, it says if not not just if so it’s meant NOT to affect UnionOperations
I would edit your hazard script to not parent the sucking script to non unioned parts instead of this script.
Your hazard script is going to cycle through the parts in the workspace to decide which parts to clone the sucking script to, and handle it like that probably.
That also doesn’t work, but I came up with an idea. The tornado doesn’t pick up the ground, so if I just union the foundation with a piece of ground that’s invisible it shouldn’t pick it up.