So I have an AI in game and I want it to throw projectiles at you. I have a custom projectile system that uses CFrame to move and raycast to detect collision. The projectile will be visualized on the client, but I was wondering how I would do the detection. Would it be on server side?
1 Like
Detection should always be left to the server, since otherwise, an exploiter could simply ‘detect’ every hit, and return weird values.
So i would have it manipulating the cframes and raycast on the server while the client does this too only they have a visual of the object?
Yep - just manipulate the projectile on the server altogether.
There’s slight improvements you can do to this, though, like letting each client handle the movement of the projectile, but keeping the hit detection on the server (makes it less choppy).
2 Likes