Making a platform fall after stepping off it

I looked up this here and I got some codes, but I’m getting some errors. Some help please? If it’s something simple I’m missing out do let me know, I’m a little rusty to this.

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

public class PlatformFall : MonoBehaviour {

	public Rigidbody platform;
	private bool hasPlayerExited;
	float time = 0f;

	// Use this for initialization
	void Start () {
		platform = GetComponent ();
		platform.isKinematic = true;
		platform.useGravity = false;
		platform = gameObject.GetComponent<Rigidbody> ();
	}

	void OnCollisionEnter () {
		
		hasPlayerExited = false;
	}

	void OnCollisionExit () {
		
		hasPlayerExited = true;
	}

	// Update is called once per frame
	void Update () {

		if (hasPlayerExited == true) {
			timer += Time.deltaTime;
			if (time > 0.5) {
				platform.isKinematic = false;
				platform.useGravity = true;
			}
		}
	
	}
}

*These are my errors:

Using the generic method ‘UnityEngine.Component.GetComponent()’ requires 1 type argument(s)

The name ‘timer’ does not exist in the current context*

1) Just delete first line from you Start method. You don’t need this. And move this line - platform = gameObject.GetComponent ();- to first line in Start method

2) Also change word timer to time in the update method