Nevermind got it working, there were a few misspellings in your script, thank you a lot for this, super useful, tho I wish the scale could be applied based on the instance's own scale parameters but I did not see a way to do so.
The fixes made are minor, but I'll list them here if anyone needs them:
line 1: extends not extend
line 9: it's CollisionShape.new() not Collision_Shape
I also added my own stuff, because while it's amazing to be able to use the instanced mesh as the source for creating the trimesh collision shape, doing so with lots of fairly complex objects (trees in my case) can be I assume costfull, so instead, I implemented a cylinder as the collision, in roughly the same dimensions, they extend higher into the air than normal so it looks like your colliding with the tree when it's actually a more simple object.
extends MultiMeshInstance
func _ready():
var multiMesh = get_node("."). multimesh
#var Collision_shape = CylinderShape.new()
for index in multiMesh.instance_count:
var meshTran = multiMesh.get_instance_transform(index)
#var shape = CollisionShape.new()
var shape = CollisionShape.new()
var shapeMesh = CylinderMesh.new()
#shape.shape = multiMesh.mesh.create_trimesh_shape()
shape.shape = shapeMesh.create_trimesh_shape()
shape.transform.basis.x = meshTran.basis.x
shape.transform.basis.z = meshTran.basis.z
shape.transform.basis.y = meshTran.basis.y
shape.scale = Vector3(1,6,1)
shape.rotation.y = 25.132
shape.rotation.x = 25.132
shape.rotation.z = 25.132
var sBody = StaticBody.new()
sBody.transform = meshTran
sBody.add_child(shape)
add_child(sBody)
index += 1