This is a game with 2 players, a host and a client. When either player runs out of ammo, I am trying to give the other player a free headshot. When the client runs out of ammo, the host gains the lock on, but when the host runs out of ammo, nothing happens. I checked using a print text that updates whenever either player shoots and the client cannot see the hosts ammo count change when they shoot, it stays at the default (6) while the host can detect the clients ammo count changing. Is there any way that I can let the client see the hosts variable changing live?
multiplayer can be complicated so i wont go over everything but
you dont need this on tick, call an event on ammo changes whenever you update the value, then when it hits zero, find valid enemy and send a lockon event
everything here should be server side only to prevent cheating so you dont even need server calls, although you can replicate the variables for client HUD etc