Hello, I am new to Godot and I am making a game for my school project but I cannot get the score to update once I pick up a coin. but once the game ends it will then update how can I solve this?
I have checked multiple resources but none seem to work. Here is my code:
if body.get_name() == "Floor":
PlayerVariable.Global_enemyScore += PlayerVariable.Global_enemyScore
var scoreCounter = print("The enemy's score is " +
if body.get_name() == "Player":
PlayerVariable.Global_playerScore += PlayerVariable.Global_playerScore
("The player's score is: " + str(PlayerVariable.Global_playerScore))
PlayerVariable.Global_totalScore = PlayerVariable.Global_playerScore
Also here is my node layout:
Can you help?