How to edit points of CollisionPolygon2D Via GDScript

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By The_Duskitty
:warning: Old Version Published before Godot 3 was released.

Basically i need to be able to edit some Points on a CollisionPolygon2D in my Game so i can make it adjust to the window size How might i be able to do this, because the documentation for it says it’s editor only in terms of coding

:bust_in_silhouette: Reply From: puppetmaster-

I have changed the collisionShape in my game with

clear_shapes()
add_shape(new_shape,old_transform)

the old_transform i got like this:

func _ready():
	old_transform= get_shape_transform(0)