Enable/Disable script on trigger

My code:

def OnTriggerStay(collisionInfo as Collider) as void:
		player = GameObject.Find("Player")
		direction = player.transform.position - transform.parent.position
		hits = Physics.RaycastAll(transform.parent.position,direction)
		i as int = 0
		safe = false
		while i<hits.Length:
			if hits*.transform.tag == "Respawn":*
  •  		safe = true*
    
  •  	i++*
    
  •  if safe == false:*
    
  •  	audio.PlayOneShot(alarmsound)*
    
  •  	script = GameObject.GetComponent("movement")*
    
  •  	script.enabled = false*
    

I get the following errors:
Assets/detection_script.boo(25,33): BCE0020: An instance of type ‘UnityEngine.GameObject’ is required to access non static member ‘GetComponent’.
and
Assets/detection_script.boo(26,20): BCE0019: ‘enabled’ is not a member of ‘UnityEngine.Component’.
Any idea where I’m going wrong? The documentation has no reference for Boo. Is this a JS only feature? If so, how can I do the same thing with boo?

You want to get access to the movement script attached to an instance of a game object in the scene. GameObject is a class. player is an instance of a GameObject, so if player has a movement class attached to it, you would use player.GetComponent(“movement”) instead. The second error is probably because of the first one, or it could be because boo thinks “script” is a Component type instead of a movement type. I can’t help you with how to cast in boo.