How to write this script?

You’re not setting the “OBJECT” on the second cast. Not even sure why you even have that cast or either actually.

I’m going to assume that the class this code is in is the Firewood. When you overlap it with a character you want to pick it up if possible etc etc.

If that’s the case then cast to character, on success → branch check → etc.