Button object has no attribute OnClick

I copied and formed this from an example and i really scratch my head whats wrong with it.


	kgo = GameObject()
	butn = kgo.AddComponent[Button]()

i get:
‘Button’ object has no attribute ‘OnClick’

I get the same problem when i Instantiate a Button.
Whats wrong with this? Oh and before you wonder why so much of text and ; are missing this is python but i guess its easy enough to read when you know c#

Aww i found my mistake


must be