Code attributes changing

I need help on some code to change the attributes in code to the click of a button, like weapon sway, when you click to aim it will stop swaying so you can aim, how to do?
Screenshot 2021-03-02 at 08.29.05 Screenshot 2021-03-02 at 08.28.51 !

PS. i have tried a bunch of stuff but i cant figure it out…

Hi @Gavin_Durbin,

If you mean change the editor attributes on runtime, that you can’t do.

Those attributes are being exposed in editor when you click the Parse button, and are used to render the script component fields.

what about after runtime?
is it possible to make another script that refers to another, so when pressed down a button it will disable another script

Yes, definitely, though you don’t attributes for that:

// when button is pressed
myOtherEntity.script.myOtherScriptName.enabled = false;
1 Like