Part that pulls players to its position if they are close

  1. What do you want to achieve? Keep it simple and clear!
    I want to know how to make a part that pulls players to its position if they get close enough.

  2. What is the issue? Include screenshots / videos if possible!
    I’m not sure how to even do this I know about body position but I do not understand 1 bit about it.

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I looked around a bit but couldn’t find anything so decided to do this.

If anyone can give me a good way of making this I would be very happy :slight_smile:

1 Like

It really depends on what kind of “pull” you want, however before we even talk about the pull method, I’d recommend casting a ray towards the centre pos and then sending the player back in that direction if the ray isn’t big enough to reach the centre (i.e. out of bounds).

You could, if you choose, use a bodyVelocity and drag them back, or a simple lerp on the player. You could even use Path Finding to walk the player back. There would be some issues with the bodyVelocity and lerp, i.e. going through parts, but that wouldn’t able to be fixed without some extreme A* algorithm.

2 Likes