I want my player to explode with body parts flying all over the place after they die. I do this by creating an explosion when my player gets hit.
The issue is the way i’ve written my code so far, my player is moved into replicated storage before the explosion and therefore the character doesn’t explode.
I’ve tried cloning my character before my original character is moved into replicatedStorage, the issue here is that it triggers my player or character added event. Is there a way of cloning my character without triggering these events?
i’ve also tried removing humanoid,humanoidRootPart before putting it into workspace
It’s because the character’s default property, Archivable by default, is false. This property prevents you from manipulating any values of said instance.
Is there a way of cloning my character without triggering these events?
Better question. Why do you need to clone the character?
Why not, when they die, store their username / UserId inside a table instead of having a physical copy of their character, which would probably be less efficient and slower than the table, then when the time comes to load them, just iterate through that table, and load their appearance like so using this: https://developer.roblox.com/en-us/api-reference/class/Player#characterappearanceid
As for the explosion effect,
Instead of having an explosion, you can achieve the same thing by iterating through the character WHEN they die, and giving everything that is equal to a base part an initial random velocity to achieve that sort of explosion effect.