I'm doing this:
var entity = ball.get_collider()
if entity.get_name() == "bat":
and on this line
if entity.get_name() == "bat": I'm getting this error:
Invalid call. Nonexistent function 'get_name' in base 'Nil'.
So I'm assuming that entity doesn't have anything in it. I find that strange though as it only comes into play AFTER the if statement. So how can that be?
I must be doing something wrong so I'm hoping someone can shed some fresh eyes on this for me.
Thanks so much....