Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Should ray-casting be handled on the server or the client?

As the question in the title says. Should ray-casting for guns be handled on the server? If so, wouldn't it lag the server, especially when multiple players are shooting their guns?

And if we were to handle it on the client, how would we detect and validate that the client has got a hit?

1 answer

✓ Accepted answer

This is a hard question. IO games follow this issue. Usually an IO game would let the client calculate it, and make changes, but send data to the server. The server would then validate that information, and send it to the client to compare it with what change it made.

In short, the server validates the information, clients are free to make a bullet appear etc, but the client will make changes if needed based on the reply from the server.

1 comment

0

Server validation is the problem, since it's hard(atleast for me) to make a validation algorithm. Thanks tho.

This discussion is preserved as it was. New answers, comments, and votes are closed.