How to make the part bricks when the part get jump by the user?

Hello there,
Can you help me on how to make the part bricks when the part get jump by user and can you show me or link me the id so that I can try or do the thing that you send me in this topic. if I found a working part bricks that you replie you also get a solution from this topic.

Sorry for the small talk because I don’t have anything else to talk right now

Can you rephrase your topic? I don’t seem to understand it

ok it is like this
when you jump on the part, the part just got brick into a hundred pieces.
so I hope you understand why I’m try to say.

Oh, okay, what you wanna do is add 100 (or any desired number of bricks) bricks then go to the Properties tab, then set the parts’ anchor to false

but how to make the part stay they were and how to make the part noticed the user is jumping on the part that jump right now

1 Like

What you’re gonna wanna do is something like this:
Model = a model with a bunch of anchored 1 stud parts

local db = false

function unachorParts(smallbrick)
   for i, v in pairs(smallbrick.Parent:GetChildren()) do --Checks the parent of the touched parts children
      if v:IsA("Part") then --Checks if the child is a part
         v.Anchored = false --If true, it unanchors
         -- v.Velocity = Vector3.new(0, 5, 0) --optional velocity
      end
   end
end  

for i, v in pairs(game.Workspace.Model:GetChildren()) do --Checks all the children of the model with the smaller parts
   v.Touched:Connect(function(hit) --Applies a Touched event
      if hit.Parent:FindFirstChild("Humanoid") and not db then --Checks if there's a humanoid and for the debounce
      db = true
      unanchorParts(v) --Activates the function with the touched brick as a parameter
      db = false
      end
   end)
end

Hi there!

What you could is make a touch function. I don’t know if you’re familair with scripting, but there’s a bunch of tutorials and for sure topics here on the DevForum explaining it!

So basically you want to make a touch function which could then show the rest of the 100 parts. Not too sure what you meant in the question, so you might want to rephrase it. :slight_smile:

do you need to put the script each and every part or put the script in model?

ServerScriptService or workspace should do the trick.
Tell me if it errors by the way, I wrote it on ipad

it is look like it don’t work and it cause a little bit laggy if you touched the part

Can you send a gif/video of what happens? I added a new line which gives the brick velocity

robloxapp-20201217-2219362.wmv (1.8 MB)

Unfortunately I’m unable to view this on an iPad, I can help you later when I get on my PC or if you’re able, convert it to an mp4/gif