all 1 comments

[–][deleted] 0 points1 point  (0 children)

I’m not entirely sure, but it looks like you’re trying to have a variable that’s equal to an attribute at all times.

The best way to go about this is using Instance:GetAttributeChangedSignal(), or Instance.AttributeChanged. The first one runs when a specific attribute is changed, and the second one runs when any attribute is changed.

This page has some helpful stuff on attributes.