I made this a while ago after GPO String showcase launched and decided to release it to the public.
It uses Part Cache to reduce a bit of the lag it may cause.
Tutorial:
- Require the module in the client, for example: require(game.ReplicatedStorage.Modules.RocksModule)
- Use the “Ground” function of the module with the following arguments:
Arguments: {Position, Distance, PartSize, RaycastFilter, AmountOfRocks, IceEffect, DespawnTime}
- Position: The target’s position, needs to be a Vector3;
- Distance: The distance of the rocks from the center;
- PartSize: The base size of the part, needs to be a Vector3;
- RaycastFilter: A table of instances that won’t be affected by the raycast, it can be nil;
- AmountOfRocks: The desired amount of rocks;
- IceEffect: If you’d like it to have a ice/snow effect on it, it can be either false or true;
- DespawnTime: The duration of the effect.
Example: RocksModule.Ground(player:GetMouse().Hit.Position + Vector3.new(0, 1, 0), 35, Vector3.new(6, 4.5, 6), nil, 20, false, 3)
IMPORTANT
- Don’t use this on server side, it will throw an error and even though it can be easily solved in the module script, you still should not use visual effects on the server;
- Sadly, this module only works over parts, meshparts and unions. If I ever find a decent solution for it, I’ll be updating this;
- Currently this works only on ground;
Result of the example script:
Thanks for your attention!