How to make a tycoon game “find the closest button”

I’ve seen a couple tycoon games implement this but I have no idea how. I’ve searched but haven’t found anything yet so any ideas would be helpful.

In this particular game, the red arrows are animated and moving towards the button.

1 Like

So do you want feedback/ideas from your game or rate it?

If I had to make a guess, when you press a button to activate viewing of buyable objects,

  • It loops through all available objects that can be bought
  • It then raycasts each part to your humanoidrootpart and creates a beam with that arrow texture that leads towards the button
  • It then deletes it since it’ll be updated next frame until you press the button again to stop showing

The game @jstackman shown a screenshot of is not his, it’s to show the thing he wants to recreate for his I believe

Oh alright I am not sure what’s he asking for then well let me read his sentence again.

He’s asking how he can recreate the feature in the game he’s shown to make it so that beams appear from the torso/humanoidrootpart that lead the buttons he can buy to progress in the tycoon

Will so he is asking for the coding/script for droppers and the conveyor

Not exactly, he’s just asking how he could code it so whenever you press a guibutton, beams appear from the humanoidrootpart of the player’s character that lead to buttons that the player can purchase to keep building the tycoon

Well why does he needs it it’s kinda useless unless there is newer players that are younger

Honestly I played tycoons since I was 8 years old.

We don’t usually want to complain about if features are unneeded unless they’re asking for feedback, in this case they just wanna know how to make a feature like that, not if it’s needed or not.

Ok I am go on a different forum

Ah, thank you! I didn’t think of that. A beam is probably how it’s done, I’ll give that a try.

@supersheep9000 My tycoon game is quite large and has rebirths so it can be useful if you can’t find a button.

I was able to find this post once I understood that it was a beam: https://scriptinghelpers.org/questions/83462/make-a-player-part-beam

Thanks again!

1 Like