How can I change damage of aweapon in the script?
It is read-only...
If you're using the destructible weapon template from the NPC AI Kit it's in the destructible weapon server script in the weapon.
If you're not using that, download the NPC AI Kit from Community Content and use that.
Isn"t this property read-only?