How do i make it so that a certain script happens when you click something

im trying to make it so that you can pick up a rock by clicking it. is there any possible way to do that?

4 Likes

You can make a script on the player unit like this, then add a keybind to the unit that runs this script when Left click is pressed. It checks if any items overlap with a small region surrounding your cursor, and picks the items up if they do.


5 Likes