Raycast hitboxes and exploits

There are a few optimisations you could make to make it run better:

  • instead of outright cloning the character, only clone the BaseParts and put those in a new model.
  • instead of iterating through the workspace every frame, iterate through players (if you only want pvp combat) or use tag every model with a humanoid and then iterate over CollectionService:GetTagged("name of humanoid tag").
  • Instead of using a different WorldModel for each character put all the characters in the same WorldModel for each frame.
  • if you want you could also also make a new WorldModel every couple milliseconds instead of every frame (this depends on how much accuracy you want to have as opposed to performance)
  • if you put all the character clones in the same WorldModel, having the character name as part of the name of the WorldModel would be redundant, so you could just name it the tick() it was created on, which means you also don’t have to split the string each frame.

So you’re already raycasting between the players on the server side but didn’t think to just use the raycast as the actual hit detection itself?

Also, you are literally giving the exploiters the ability to headshot on every shot on a silver platter and you still can’t tell what’s going on.