Suction ability with a device....like a vacuum or Kirby.

I’m not too great with scripting in general but right now I’m trying to make a device that pretty much has the same ability as Kirby. Where do I even begin?

Ok so to solve a problem like this you need to break it down.

First question is to ask yourself what do I need to know to make this work.


Well you need to know what objects are being vacuumed, the strength of the vacuum and the position of the end of the hose.
To find the objects to suck up the best option would be a collider you can check to see if anything enters it. Then you can use built in collision detection to know when to suck up the objects.
The end position of the hose can be just an empty game object as a child of the hose positioned at the very end of it and just use the transform of that component for its position.
Now you need the sucking action. To suck something up in a vacuum you are essentially apply a force towards the hose end that falls off with distance.
So you need rigid bodies attached to the objects you are sucking so that can respond to forces and apply a force towards the end of the hose with a force scaled by some factor proportional to the strength of the vacuum and inversly to the distance from it.
This should get you started! Good luck.