Use Citizen.Wait(0) or some way to let the client know it needs to yield. Right now it will run indefinitely, thus freezing your client.