I’ve been experimenting how to replicate grenade shrapnel, and my first instinct was to use parts and clone multiple before the grenade explodes and then use ApplyImpulse() to make them fly everywhere.
This is an example of the hierarchy for the grenade as of right now.
inside the module is this function, which picks a random number between 30 and 65, and then clones a shrapnel part I have in replicated storage.
shrapnel location
then it sets the shrapnel clone’s position to the parameter ‘grenade’, which is the grenade that you just threw.
then finally, it calls a module script function inside FragmentScript called ‘ExplodeFragments’
the ExplodeFragments function just adds random impulse, and the shrapnel damages any player it touches through the ‘Damage’ script as seen above (simple kill brick type thing)
now my whole problem is that i’m able to run this in studio w/o lag spikes, but there’s a big gap between client and server replication when playing on the Roblox player. two video examples can be seen below.
in-studio
in the roblox player
so as you can see, there’s a noticeable pause in server physics and connection in general. i havent looked at the internet/server specs like recv or anything when this occurs, but my question is why does this happen (which i assume is the mass cloning of parts), and how can i make it run smoother?