I can't find where I'm wrong

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

public class playercontroller : MonoBehaviour
{
   
    public float runSpeed = 5,0f;

    public float rotationSpeed = 200,0f;
    private Animator anim;
    public float x, y;

    // Start is called before the first frame update
    void Start()
    {
      
    }

    // Update is called once per frame
    void Update()
    {
        x = Input.GetAxis("Horizontal");
        y = Input.GetAxis("Vertical");

        transform.Rotate(0, x * Time.deltaTime * rotationSpeed, 0);
        transform.translate(0, 0, y * Time.deltaTime * runSpeed);
    }
}

is there some error message (screenshot / or copy from console window)?

The problem is you’re using commas instead of decimals:

public float runSpeed = 5,0f;
public float rotationSpeed = 200,0f;

These should be:

public float runSpeed = 5.0f;
public float rotationSpeed = 200.0f;
2 Likes

When you get an error message you don’t understand, please next time copy the error message from the console (you can select and copy the text in the lower half of the console when you’re viewing an log message). Also please choose a descriptive title. The title will help no one who made the same mistake.

1 Like

How to report your problem productively in the Unity3D forums:

http://plbm.com/?p=220

1 Like