Ray reached object lose 'HP'.

I’m having some problems with “ray.hitObject” code:

if lmb.positive:
    ray.hitObject['property'] -= 10

The ‘hitted object’ needs to lose 10 HP when the ‘Left Mouse Button’ is pressed, but it wont work:confused:

Please help me with this thing

you can ezyle do this in logic bricks

I think that’s not possible to do in logic bricks, cause i can’t make the object rayed “know” that it happened.:frowning:

soz i dont know how to use ray but what do you need it for ? :stuck_out_tongue:
if it is for a gun or somthing i know ways around it