Hi! I tried creating a script for Police team, but i can't manage to move players to teams when they apply to a job. 
This is my script: 
  
local policeTeam 
  
function createPoliceTeam() 
    policeTeam = createTeam("Police", 0, 0, 255) 
end 
  
addEventHandler("onResourceStart", resourceRoot, createPoliceTeam) 
  
function movePlayerToPolice(thePlayer) 
    if (getElementData(thePlayer, "Role") == "LSPD Officer" or getElementData(thePlayer, "Role") == "SFPD Officer" or getElementData(thePlayer, "Role") == "LVPD Officer") then 
        thePlayer:setTeam(policeTeam) 
        thePlayer:setNametagColor(0, 0, 255) 
    end 
end 
  
 
Which eventHandler do I have to choose for movePlayerToPolice() function? 
(LSPD Officer, SFPD Officer and LVPD Officer are the jobs names I put on job.slua)