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

How do you disable TouchInterest?

Asked by 7 years ago

I've been drifting towards tool creating, and created my gun so that when its dropped you click to pick it up. But of course, you can still just walk onto it and pick it up. I've been searching for about an hour an the only thing that might have helped me was a forum post, But it didn't due to the ROBLOX forums shutting down. I've tried "TouchInterest Removers" but they didn't work.

0
touchinterest:Destroy() ......... a few moments later......... instance.new("TouchInterest") greatneil80 2647 — 7y

2 answers

Log in to vote
0
Answered by 7 years ago
Edited 7 years ago

As mentioned in greatneil80's comment, removing the Touch Interest object'll do it.

Tool.ChildAdded:Connect(function(child)
if child.Name == "TouchInterest" then child:Destroy()
end)
0
Thank you for adding my name in your answer :) greatneil80 2647 — 7y
0
Credit where it's due! I don't know how exactly to tag people, if it's a feature. DropshipPilot 148 — 7y
0
@DropshipPilot What script do I use for it and where does it go? Lord_Nermall 1 — 7y
0
This line of code works in any Script (not LocalScript, though!). It should work so long as you replace "Tool" in the code with the path to the Tool object (usually script.Parent). DropshipPilot 148 — 7y
Ad
Log in to vote
0
Answered by 7 years ago

I think I have a pretty easy solution. There are probably a lot of better ones out there though. What I think you should do is when the tool get's dropped you should run a script that takes the tool and makes it into a model and put's it into the workspace. This way players can't walk onto it and pick it up. From the script, you can then have it create a click detector and then once someone clicks it the model then get's made into a tool again and goes inside the player's backpack. If you would like some code on how to do this then let me know!

Answer this question