I’m creating a voxel destruction system, it will be very small scale with probably less than ~500 parts on screen at once. The system I made looks really cool. However, it is extremely slow and clunky.
Here’s what happens:
The system works by every voxel having a script that checks for a .touched event, then checks if its the player. If it is, it launches then destroys itself.
I know this is an extremely slow way to do this, so I’m wondering what a better approach would be? So far I’ve thought of a couple things
-
The player uses a local script to check if they hit a voxel, if they did send a remote event to the server to verify and destroy the part. (I feel like using a lot of events would slow it down
-
Using a model with the voxels and a hitbox to detect the player, then cycling through the voxels in that model to see which are touching the player.
Any ideas?