How do I make bricks regen after being destroyed?

I want to know how to regen models after a certain time. Can someone explain how to do this?

an example of what I’m talking about:


1 Like

I’m no scripter but I found this. Hope this works.

model = game.Workspace.ModelName
messageText = “Regenerating ModelName…”

message = Instance.new("Messagememessage.Text = messageText
backup = model:clone()

while true do
wait(300) – regenerate this model every 300 seconds

message.Parent = game.Workspace
model:remove()

wait(4) – display regen message for 4 seconds

model = backup:clone()
model.Parent = game.Workspace
model:makeJoints()
message.Parent = nil
end

6 Likes

Thanks, I’ll try it out tomorrow

1 Like

Cloning is your best friend. Insert the original model into ReplicatedStorage or ServerStorage and whenever the model gets destroyed, simply clone it, and destroy the destroyed brick. The script should be in ServerScriptService.

Or, you can make a while loop and after 30 seconds, it can “regen”. Hope this helped!

5 Likes

Grouping it makes easier referencing while scripting.

2 Likes