Script not allowing me to change an IntValue [Solved]

My script seems to be getting very confused. Most of the time when I type

IntValue.Value = 0 --or whatever value

it works perfectly find but in this one case it gives me the error “attempt to index number with ‘Value’”. I have double checked that the variable is refering to the IntValue itself and not IntValue.Value but I am getting the same error, however it works fine if I just do IntValue = 0 somehow. Here is an image of the variable referencing the IntValue as well as the location of the IntValue in the explorer :

Here is the line that gives the error later on down the line :

Just before line 235 add two print lines to check what MovementPriority is at that moment:

print("MovementPriority =", MovementPriority)
print("MovementPriority Type =", typeof(MovementPriority))
1 Like

Just realised I am very silly. Somewhere in the script I changed the value of the variable to an Int value. Thanks for your time.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.