![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | MaximoTG98 |
Hello everyone!
So,i’ve been struggling to change the sprites texture.What i’m trying to achieve is change the sprite image of a node using a resource path(e.g.“res://Sprites/crop0.png”) that is inside of an array.
The array has 4 resources paths all of them are the same as the example.
This is what i wrote: sprite.texture = crop[1]
But if i try to run the game i get an error:Invalid set index 'texture' (on base: 'Sprite') with value of type 'String'.
I also tried to change the texture_normal of a texturebutton and it doesn’t work as well.Same error.I didn’t make any typo at the path…
And that was it… Let me know if you know how to fix this or even an idea please.
Have a good day.