Disable colliding to a specific object

So I have a “ghost” player who is controlled by a script.
He does everything which is expected from the player to do in the tutorial level.
My problem is when the player wants to fool around, he can push the ghost off his route and the ghost may fall off a ledge or similar.
I cant disable the collider component as the ghost script requires it to replay his movement.

Is there a way to ignore collision with a specific object?

update: nevermind after some research i found the collision layers in unity.