I’m attempting to make a swingable tool that collects currency from a brick. Basically, like swinging a sword but if the sword is in proximity of the brick it will be able to collect currency from it.
One way to accomplish this is to use Region3s, specifically FindPartsInRegion3, to get all objects in front of the character, or wherever your tool’s hitbox is, and check for whatever collectable( flowers if you’re talking about bee swarm simulator ) inside of that table of objects.
Getting there distances between all collectibles with .Magnitude and some sort of loop would be extremely inefficient, which is why these options are better.
You can most likely make either of these methods work. It’s just a matter experimentation and which works better for your protect specifically.