- Home /
 
 
               Question by 
               Phizzy · Apr 07, 2021 at 08:02 AM · 
                c#animation2dmultiplayer  
              
 
              Trouble with Animation Code
I want this to work but it just won't, I'm making a multiplayer game and this is one of the many things I tried to get skins in the game, but it won't work! can someone tell me what I'm doing wrong?
         if(PlayerNameText.text == "Kid")
         {
             anim.SetFloat("Kid", Mathf.Abs(movement.x));
         }
         if(PlayerNameText.text == "Becc")
         {
             anim.SetFloat("Becc", Mathf.Abs(movement.x));
         }
         if(PlayerNameText.text == "Lucy")
         {
             anim.SetFloat("Lucy", Mathf.Abs(movement.x));
         }
         if(PlayerNameText.text == "Jameson")
         {
             anim.SetFloat("Jame", Mathf.Abs(movement.x));
         }
         if(PlayerNameText.text == "Lucas")
         {
             anim.SetFloat("Luca", Mathf.Abs(movement.x));
         }
         if(PlayerNameText.text == "Ilan")
         {
             anim.SetFloat("Naji", Mathf.Abs(movement.x));
         }
         else
         {
             anim.SetFloat("None", Mathf.Abs(movement.x));
         }
 
              
               Comment
              
 
               
              Why it doesnt work? what happens¿ are the transitions conditions set up correctly in the animator?
Your answer