Your answer already won the solution, but what did the user weakroblox35 mean with:
I think they are either misinformed or they are talking about how you can have the client tell the server that it hit something, and then just have the server validate that the thing the client hit is within line of sight, meaning the server doesnât need to know the direction fired, just the position hit, the issue with this is that itâs less secure than other methods
the beam would be launched from the server what the client would do is send the mouse position
in the situation described it would be like
Client reads mouse 1 input
Client checks if it has ammo and it hasnât been too short of a time since last shot
client makes bullet effect
client fires gun remote event with hit target
Server checks if client has ammo, is in sightline of target, and if it hasnât been too short since the last shot
Server detracts an ammo from gun and hp from the target
Server tells all the other clients to show the bullet effect
only one remote is fired, but its pretty insecure and honestly not worth it compared to the alternatives
Last question: which method is safer?
although a furry bird told me that roblox updated
its security, also I would send only the position in which it intersects, and the server decides the origin
you should have the client send the vector in which itâs looking whenever it tries to fire a shot, although technically itâs not the most secure, robloxâs limitations make it one of the most reasonable things to do
I got it confused with projectiles since I tend to use mouse position for projectile throwing and yes you can use FastCast.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.