Hi, i'm a complete beginner to godot so sorry if my code is unreadable trash. Here it is:
extends Sprite
export (PackedScene) var Pipe
onready var new_pipe = Pipe.instance()
func spawnpipe():
newpipe.position = Vector2(-30.941, 4.235)
addchild(newpipe)
print("Duplicated")
I'm sorry i cant get the code sample thing to work ):
For context, i'm making a flappy bird clone and i need the pipes that you go over to spawn and spawn and spawn. The spawn pipe function is hooked up to a timer and it gives the error above.