I have a rock that will fall from the sky and crush the ground. When it crushes the ground, I want it to summon parts using debris service to simulate parts falling off of it.
But the problem is, I don’t know how to make debris service create more than one part, and with differing randomness from the part that is shown below.
Here’s a small snippet of code where I use the service:
I have a feeling you don’t know what Debris service does. The first parameter of Debris:AddItem() is to specify a part, and the second parameter is how long the part will last for until it’s destroyed.
All it does is just destroy a part after the specified time. It doesn’t create parts.
That is possible too, although you don’t need if debris as it has already been defined in the script. Destroying an instance doesn’t cause the variables which point to it to point to nil (they still point to the destroyed instance). On a slightly different note, 0 is a valid second argument for Debris:AddItem().