The way i do it is the make the trigger, getting the mouse position, on the client side, and do everything else on the server side, from creating the projectile, its visual, setting its velocities, and collision detection.
I'm sure theres a lot more efficient algorithm out there, how would you script your fireball?
sry for my bad english
Like u said :
mouse.position on the client side and do everything else on server side
I dont know if there any other ways to do it.
Have a good day :D
I usually spawn my fireballs at the client’s head, send the server Mouse.Hit and then spawn it from there.
It’s best to do all things that can be abuse able on the server rather then the client.