Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make it so players can't pick up a tool off the ground? [closed]

Asked by 3 years ago

I'm trying to make a game where you need to hover your mouse over a tool and press E to equip it. The problem is, I haven't found any way to make it so the player can't just pick the tool up off the ground. If anyone has a thought or solution, that would be very well appreciated.

0
Not the best scripter, but you can disable the 'TouchInterest; if a tool I believe. Quick example I wrote: script.Parent:WaitForChild(“TouchInterest”):Destroy() If not, you could disable the handle, meaning that the tool can't be used since it requires a handle. Not sure if it will rather error your code. vStarzzy 0 — 3y

Closed as Not Constructive by JesseSong

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
2
Answered by 3 years ago
Edited 3 years ago

Check out this devforum post on it: https://devforum.roblox.com/t/how-can-i-stop-the-player-from-picking-up-tools/399097

It basically says, if the handle has a "TouchInterest" in it, simply delete it. A touch interest, like its name suggests, detects if it's being touched.

To do this you would need to use something like this:

script.Parent:WaitForChild("TouchInterest"):Destroy() -- this would be in the handle
Ad