Recently I have been working on a project of mine, and I decided to try to make a tornado that would be able to rip my buildings apart (In this case UnAnchoring so that the buildings fall apart).
I have taken a mesh from an old Roblox Gear and put it inside a MeshPart. I have also added scripts so that it will spin and move around.
The problem that I am facing is that I can’t make the buildings break. This is the script that I am using:
script.Parent.Touched:Connect(function(Object)
print(Object)
if Object:IsA("BasePart") then
Object.Anchored = false
end
end)
When I run the game, the tornado ignores everything as if it didn’t exist. However, it registers my avatars body parts. Any ideas/suggestions on how to fix it?
I am using TweenService to move it. Here is the movement code:
local TweenService = game:GetService(“TweenService”)
while true do
wait(2)
local info = TweenInfo.new(8)
local Target = Vector3.new(math.random(-96,96),43.5,math.random(-96,96))
local where = {}
where.Position = Target
local Tween = TweenService:Create(script.Parent, info, where)
Tween:Play()
end
I managed to fix it by changing the movement to a body position that changes position every 3 secconds. It works for now, so I will mark it as a solution. If I encounter more problems, then I will be in touch