#Help with code?

1 messages · Page 1 of 1 (latest)

cyan relic
#

I cant seem to get this line of code to say "Epaint" OR "Epaint (clone)". Can someone please help me do this?

isOnEPaint = collision.gameObject.name == ("Epaint");

wary schooner
#

are you trying to set both isOnEPaint and collision.gameObject.name to "Epaint"?

cyan relic
#

Yes

wary schooner
#

== is an equality operator, it should only be used when you are trying to check something

#

You need to use an assignment operator = to set the value