Hello i would like to know how you can know when a client is finished when you fire a remote from the server

my attempt

server

game.ReplicatedStorage.js:FireAllClients()
repeat wait() until print"finished with code" == true

client

game.ReplicatedStorage:WaitForChild("js").OnClientEvent:Connect(function()
print "got it"
wait(3)
print "finished with code"
end)

i wanna know how the server can know when the client is finished with the code