Currently Working on Ope Ope no Mi

As you can see, this is a local script for the devil fruit I’m currently working on.

I’m trying to achieve an effect similar to this, where a room is made, and the moves for it are only usable on player’s inside. For example, on line 356 it’s supposed to switch the locations of the Player who activated the room with the person they have their mouse on. I managed to get this to work, but I need some help creating the logic for it that let’s me only allow the player’s to be switched if the player or part the person is aiming at is inside the Sphere.
https://i.gyazo.com/d7c4fe96823f1fb4f58d36219b7a899d.mp4
Above is my own room, and what it looks like so far. The Sphere itself is a mesh inside of a Part with the size of (1,1,1). Please help I’ve been stuck for the past 2 days on how to make the logic to make the move only work if the target that the mouse is on is inside the sphere mesh.

Have you considered using Region3 to detect if anyone is inside of the sphere? You can read more on Region3 here. What you wanna do is first get the target of the mouse. Then make a check to see if the target is inside the Region.

1 Like