I'm getting an error:
Script inherits from native type 'RigidBody2D', so it can't be instanced in object of type: 'CollisionPolygon2D'
The line in queston is:
func createSubRock(res, pos, x, y):
var _rock = load(res)
var rock = _rock.instance() -------- HERE!!!
rock.set_pos(Vector2(pos.x + x, pos.y + y))
rock.score = 75
rock.add_to_group("rocks")
main.add_child(rock)
On one machine, it works but on another, it stops. What am I doing wrong here?