Networking CharacterController Help.

Hello guys, when I make my own character controller on my network, I can walk through things, here is the controller :

function Update(){
transform.Translate(Vector3.forward * 12 * Time.deltaTime);
transform.Translate(-Vector3.forward * 8 * Time.deltaTime);
transform.Rotate(0,1,0 * Time.deltaTime);
transform.Rotate(0,-1,0 * Time.deltaTime);

But sadly, when I use this the player can walk through walls. The only way that the character to move is by adding two components, FPSInputController and CharacterMotor. But I don’t want these because you can move left and right, which I don’t really want. However, if I try removing these components, the camera won’t attach to the player when I start a server. I think this is because this script here :

static var target : Transform;

function Update (){
transform.parent = target;

I think this script looks for the components FPSInputController and CharacterMotor, which then attaches the camera to this object. So I can’t remove these components, but if I do, it won’t work. But if I don’t the player moves left and right and I don’t want that. It could be something to do with a mesh collider on the mesh in game but I don’t know. Thanks!

Any operation that derives from the direct modification of an object’s transform position will not be affected by physics. You should try a different, physics based method of movement instead. Try using a kinematic rigidbody and a capsule collider for your player.
You can also easily create your own script that will attach the camera to the object and attach it to the player. Simply copy the code you just pasted above.