i m a begineer so help me with this looking around script(solved)

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class looking_around : MonoBehaviour
{
  
  
    public float mouseSensitivity = 100f;
  
    public Transform playerBody;
    // Start is called before the first frame update
    void Start()
    {
      
    }

    // Update is called once per frame
    void Update()
    {
       float mouseX = Input.GetAxis("Mouse X") * mouseSensitivity * Time.deltaTime;
       float mouseY = Input.GetAxis("Mouse Y") * mouseSensitivity * Time.deltaTime;
     
       playerBody.Rotate(Vector3.up * mouse X);

    }
}

my error:
Assets\looking_around.cs(24,45): error CS1003: Syntax error, ‘,’ expected

You misspelled mouseSensitivity when declaring it on line 9. You’re missing an “i”

1 Like

Thanks!
but i have another error :frowning:

Assets\looking_around.cs(24,45): error CS1003: Syntax error, ‘,’ expected
???

You mispelled “mouseX” writing instead “mouse X”, with a space. If the error log says “syntax error”, then just control if you mispelled your variables somewhere…
I advise getting used to writing only the first part of a variable, and then pressing tab or enter to autocomplete it when the right word in the suggestions window that pops up is enlightened. This will make things faster, especially if you have lots of variables with long names, and will make you avoid mispelling errors.