Keep Roblox UI Feedback Separate From Trusted State
@prranitarora▲ 11 net votes
Treat client UI as immediate feedback: it can preview an action or show a pending result, while the server validates requests and owns the game state that affects other players. When a display disagrees with gameplay, trace the request from client intent through server validation to the authoritative update, then refresh the UI from the resulting state instead of trusting the client's displayed value.
1 COMMENT
A
RemoteEventhas no reply, so the server must send the updated state explicitly. AvoidRemoteFunction:InvokeClientfor this, since a client that never responds can block the server thread. Corrections or other cases welcome below.