ERROR CODES PLZ HELP

i am making a rigid body controller and this is happening
these are the errors here
Assets\RigidBodyMovement.cs(31,68): error CS1061: ‘RigidBodyMovement’ does not contain a definition for ‘velocity’ and no accessible extension method ‘velocity’ accepting a first argument of type ‘RigidBodyMovement’ could be found (are you missing a using directive or an assembly reference?)
Assets\RigidBodyMovement.cs(31,20): error CS1061: ‘RigidBodyMovement’ does not contain a definition for ‘velocity’ and no accessible extension method ‘velocity’ accepting a first argument of type ‘RigidBodyMovement’ could be found (are you missing a using directive or an assembly reference?)
my script is here
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class RigidBodyMovement : MonoBehaviour
{
private Vector3 PlayerMovementInput;
private Vector2 PlayerMouseInput;

[SerializeField] private Transform PlayerCamera;
[SerializeField] private RigidBodyMovement PlayerBody;
[Space]
[SerializeField] private float Speed;
[SerializeField] private float Sensitivity;
[SerializeField] private float JumpForce;

// Update is called once per frame
void Update()
{
PlayerMovementInput = new Vector3(Input.GetAxis(“Horizontal”), 0f, Input.GetAxis(“Vectical”));
PlayerMouseInput = new Vector2(Input.GetAxis(“Mouse X”), Input.GetAxis(“Mouse Y”));

MovePlayer();
MovePlayerCamera();
}

private void MovePlayer()
{
Vector3 MoveVector = transform.TransformDirection(PlayerMovementInput) * Speed;
PlayerBody.velocity = new Vector3(MoveVector.x, PlayerBody.velocity.y, MoveVector.z);

if(Input.GetKeyDown(KeyCode.Space))
{
GetComponent().AddForce(Vector3.up * JumpForce, ForceMode.Impulse);
}

}

private void MovePlayerCamera()
{

}
}

Please use Code tags for your code.

[SerializeField] private RigidBodyMovement PlayerBody;

There’s no such thing as RigidBodyMovement. Replace it with Rigidbody instead.

Apart from this… it’s never a good idea to just copy some code from somewhere if you don’t fully understand C# yet. There are various tutorials and courses about it, though, so… instead of trying hard to create a game at all cost, maybe learn programming first? Just saying because all of your previous threads are simply “you getting hit by errors here and there”.

thanks for the tip i got this error message after that plz help
ArgumentException: Input Axis Vectical is not setup.
To change the input settings use: Edit → Settings → Input
RigidBodyMovement.Update () (at Assets/RigidBodyMovement.cs:21)

It says right there what you should do next :slight_smile: Go to Edit -> Settings -> Input from the top of the Editor menu bar and see if Vectical is declared there. Likely not because…

… I’m fairly sure that it’s wrongly named. It should be Vertical in Input.GetAxis("Vectical"), not Vectical.
.