Whats the best way to go about cloning hitboxes

So I am making an FFA game and instead of tools with touched events I have hitboxes appear that are cloned. I have two choices based on my current scripting skills and I want to know if there is an even better way than these without any downsides.

Server Script doing it alone (First attempt)

  • Pro: If somebody looks like they are hit by the hitbox then they where
  • Con: There is a weird delay on client side with cloning at the player’s position explored in this post

LocalScript sending RemoteEvents (I am currently using this)

  • Pro: The delay on client side is not present
  • Con: Sometimes if somebody is touching the hitbox on the launcher’s client side they wont
    actually be hit. (I tried to solve it by making the hitbox take 1 second to delete but then its weird when you walk into a past hitbox and get hurt)
    *Con: Easy to exploit
2 Likes

Note: I’m not clearly sure what you’re talking about, so I may not be understanding this correct, sorry about that.
There’s a chance part.Parent.Parent will be the character, it depends on what accessory they wear, as this happen, it’s good to check if part.Parent.Parent is a character (I’m not sure if there’s things where Part.Parent.Parent.Parent is the character), then make the hitbox transparent(and turn of the cancolide if needed) because accessory shouldn’t be considered as character’s body parts(like the real world).
Solving hitbox taking 1 second to delete is a good idea, too. Just make sure hitbox will be transparent after being touched, so nobody will think it’s a glitch or things like that
Conlclusion: Using localscripts with remote events is a good way to do(like what you’re currently using), but just use remote functions and events as needed so exploiters can’t mess around with your game.
(Edited) I don’t know which way you’re bullet’s being fired. This will work fine when using moving systems like pathfinding, velotcity, moveto, etc. But I’m not sure about when using raycasting, or just teleporting bullets with CFrame.
You might want to use remote functions if you want to return signal to the client(if that’s what you’re meaning about),

1 Like