0 votes

extends CanvasLayer

const PLAYER2 = preload("res://scenes/characters/players/player_2.tscn")
var player2 = PLAYER2.instance()

func ready():
$UI
container/fullhearts.rectsize.x = 144

func physicsprocess(delta):
$UIcontainer/ballcounter.text = str(balls)

func ballsChange():
balls -= 1

func healthChange():
$UIcontainer/fullhearts.rect_size.x -= 48

i have this script and every time i run the scene an error pops up that says:
Parser Error: Can't preload resource at path:
res://scenes/characters/players/player_2.tscn

what does the error mean?

in Engine by (290 points)

1 Answer

0 votes

It means that file can't be loaded. Check that you have the path and file name correct and that you can open the scene in the editor.

by (20,899 points)

thanks for your answer
but that didn't work

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.