How can i make my code short ._.?!

How can I walk ;-;!!!

1 Like

It seems you forgot to define item there should be a local behind it.
Also you cant just use hero:moveXY() you need to know the position/coordinates of the item therefore when trying to get them you use hero:moveXY(item.pos.x , item.pos.y)

2 Likes

moveXY()

2 Likes

not everything is correct you need to define item that means it should be

local item = hero:findNearestItem()

not

item = hero:findNearestItem()
2 Likes

Thank you for explain me :smiley:

1 Like