How to move one object's position to another in unity? (c#)

How do you move one object’s position to another in unity? I need to make my player object move to the spawn point when he dies. Here is the code I am using:

this.transform.position = spawnpointsscript.gameObject.transform.position;

I am having an error with this because I am putting this on a spawn point prefab, because I have multiple levels and want to be able to easily make copies of it. The error says:

An object reference is required to access non-static member `UnityEngine.Component.gameObject’

I am guessing this is because I put it on the prefab instead of the spawn point itself. Is there a way to do this without having to put the script on every individual object, or is that the only way?

This have been asked hundred times…
Check out related questions i already gave answers to:

Create an empty GameObject named SpawnPoint and place it where you want your spawn point to be. Then just move the player to SpawnPoint’s transform.position.