Good day everyone, I’m currently making a fireball script, one that is fast, secure and overall fun to use. This is how mine works:
Client fires fireball and tells the server → Server detects and tells other clients to create one on their client with the same instructions as the one who fired it. Mine uses TweenService to handle the movement of the fireball.
I’ve been having a bit of a problem about how to handle hit detection safely. Since the tweening and all the visuals are all on the client, It proves difficult on how I’d be handling hit detection on the server, because like I said, the projectile is entirely on the client for visual purposes.
I’ve been thinking about two methods:
-
I’m going to be handling hit detection on the client, and do sanity checks on the server whether it actually hits or not. (Probably the best way as far as I know, but I do not know how to start doing this)
-
I’m going to be creating the hitbox on the server, which makes it easy to handle hit detection, but since I’d have to use tweening to make it match with the client, it destroys the entire point of me doing the visuals on the client, which is to reduce lag.
Does anyone have any other methods or any advice on what to use? Keep in mind that I do not plan on using BodyVelocity for movement of projectiles as it is just not as flexible as tweening.