How would I disable tools in a certain area?

Hello there! My name is Tony and I am the creator of Become A Jedi Simulator. I have gotten a lobby and turns out you can fling people through walls using the force tool. Is there any way I can disable tools in a specific area. Then once out of the area, the tool to work again. Help needed. Thanks in advance.

1 Like

You can set Tool.Enabled to false so the Activated event will not fire.

I am new to scripting and can’t figure out how I would run the code only in a certain area then revert it once out.

Hi! I understand what you are trying to do, and I have a simple solution to your problem. Just use a Region3 within a while true do loop and check which players are in that region (in this case being that specific area) and then for each of those players (the one’s in the specific area) you can go ahead and disable their tools using (as @COUNTYL1MITS mentioned) Tool.Enabled.

Here’s links to articles of both the Tool.Enabled property as well as Region3.

If you’re new to scripting, then I recommend you to learn the basics of scripting before you even ask complex questions first.