want to replicate mortem metallums blood spawning, the example is here:
i dont want to be sending a position through a hit remote event and im sure this game doesnt do that either
i did make a version but i dont think its the same method as the one seen in mortem metallum, i can send video of mine if needed, i used raycast in mine but im not sure if this one uses raycasts or just maths
From my observations, It seems like they’re generating particles and then spawning blood splats when said particles collide on the ground.
The blood splats are simply being scaled to get wider. The maximum scale is randomized, hence having small and bigger splats.
For positioning, the weapons would fire a hit event which is picked up by the server. The server would perform a few sanity checks to validate the hit (Position of both players, the weapon the player is holding, etc…).
Once validated, the attacking and target player’s positions can create a directional vector for the blood particles to fly out from the center of the target player’s position. With the resulting directional vector. It can also be altered with randomized value to fly out at different angles.
Again, this theory is purely from observing the video. This can be accomplished in hundreds of ways.
Like what @Forummer mentioned, you can use pre-existing raycast modules for your work. You could either use RaycastHitbox or ClientCast.
For me personally, I use ClientCast because it has the option to calculate the hitbox to the client (It was built with User Experience in mind). It’s gives a responsive client hitbox, but at the cost of just a tiny risk of exploitation. With that said, you can do a sanity check and use the server to verify whether the attack is valid or not.