Hi, just say I have a model of a bridge. How can I make it all fall apart/collapse?
You can loop through all of the parts and set their Anchored property to false.
for i,v in pairs(YourBridge:GetChildren()) do if v:IsA("BasePart") then v.Achored = false end end
Or if it's Welded then it would be
for i,v in pairs(game.Workspace.Bridge:GetChildren()) do if v:IsA("BasePart") then v:BreakJoints() end end
Adding on to what 18 said, incase there are nested models/parts.
function breakModel(obj) for i,v in pairs(obj:GetChildren()) do if v:IsA("BasePart") then v.Anchored = false v:BreakJoints() end breakModel(v) end end breakModel(Workspace["ModelName"])
Locked by youtubemasterWOW
This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.
Why was this question closed?