Replicating a crumbling wall?

Hi, I’m trying to replicate a smooth crumbling wall, ideally not unanchoring the part and allowing it to fall freely.

I’ve noticed some games tween their parts to the ground to mimic a crumbling effect, was wondering how exactly I would manage this?

3 Likes

Hi, just did a bit if looking around and found this. Might be worth looking at. https://www.google.com/amp/s/amp.reddit.com/r/roblox/comments/4v8bqa/trying_to_make_buildings_crumble_with_a_script/

2 Likes

Sorry for slow reply!
It didn’t im afraid as this allows the wall to free fall as opposed to a clean crumbling effect.

Unachoring a part and adding some sort of velocity to it would be the most realistic and natural way to go, there’s nothing wrong with that… You could try using the live PSG service to create random sized parts and negate them from your wall (to add a sort of glass breaking effect.) I personally wouldnt use this one since ive heard that live unions/negations can be quite costly data wise.

This would be more costly than simply unachoring + velocity changes but can be more customized, with EasingStyles and such. You could achieve this by getting the Y axis (height) of your ground, and then tween the crumbling part to it’s original position but replacing the original height with ground height, and then adding a randomized element to the X and Z axises. is that a word?

local wall = workspace.Wall -- a model with parts
local ground = workspace.Ground -- the floor you want to part to fall onto

local parts = wall:GetChildren() -- table of wall parts we can crumble

local function crumble()
for i = 1, math.random(5,15) do -- crumble between 5 and 15 parts
local part = parts[i]
local falltime = math.random(0,2) -- time it takes to fall
local endposition = Vector3.new(part.Position.X + math.random(-10,10),ground.Position.Y, part.Position.Z + math.random(-10,10)) -- end position
local tween = game:GetService("TweenService"):Create(part, TweenInfo.new(falltime), {Position = endposition})
tween:Play()
tween.Completed:Wait()
part:Destroy()
end
end

The code isnt that good and can be improved, but its an example of how you might pull it off.