#Unity returning error Cannot modify the return value of "Transform.position" because it is not a var

1 messages · Page 1 of 1 (latest)

hallow grail
#

Unity returning error Cannot modify the return value of "Transform.position" because it is not a variable

#

anyone know what could be wrong and how it can be fixed?

delicate gorge
#
if (transform.position.x = 13)
#

this line is wrong because = is the assignment operator

#

you want to use == to check equality

hallow grail
delicate gorge
#

uhh..

#

yeah it is

#

everything else should be fine from what I can tell

hallow grail
#

okay ty

delicate gorge