I have a game idea that would be fun(for me at least) and creating the map would be very hard. So i was thinking what if you can have a building made of 5 parts but can be broken into 1000 parts. Not sure if this would be possible but the code might look like this:
wall = game.Workspace.Wall4
player = game.Players.LocalPlayer -- Not sure if this is right
wall.Touched:connect(function(part) -- If I touch the wall I want it to break
if part.Parent = player then -- Make sure a player touched it
-- Code for splitting wall would be here
wall:GetChildren().Anchored = false --Now the wall would be a model with its broken pieces in it and the pieces would fall
end
end)
I'm still kind of new to lua so if I made any mistakes in my code up there then tell me plez :D

3 comments
You should be using LocalPlayer.Character, as LocalPlayer holds mostly GUI and unequiped tools in your backpack, aswell as some scripts. However, LocalPlayer.Character is the avatar, and has all parts of the player as well as scripts for animating and movement.
Also, you could just have a model with a bunch of parts in it and run the function for if one of them is touched. I believe that there is a glass breaking tutorial on youtube, which you could watch.
This really does not answer my question because I want one piece to break into many not have many pieces just nonanchor