Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to instance a TouchInterest?

It's so simple yet I haven't been able to run it via cmdbar, here's my command:

Instance.new("TouchInterest")

I wanna make a script that deletes the TouchInterest in the bag when the bag is being dropped to prevent the person from being brought with the bag to the teleport destination, and then instances a new TouchInterest inside the handle, but I can't actually do the first step (creating a new TouchInterest)

2 answers

You cannot use Instance.new on a TouchIntrest. It automatically appears if you have a script with a .Touched event.

5 comments

0

What are you saying though? How do I use this? I tried cloning, but the TouchInterest disappears, can you give me a little more information?

0

You cannot clone TouchIntrest, or create it using a script.

0

How can I make it impossible to grab when it's being teleported and then when it's at it's destination, I can grab it? There's no way to disable TouchInterest, I also wanna do it w/o external scripts or anything, just done in one module I have

0

It should already be impossible to grab.

0

If you want to delete it, then disable the touch script and then delete it using a script.

TouchInterest is not createable. You can only make it inside by using this script...

script.Parent.Touched:Connect(function()
	local TI = script.Parent:WaitForChild("TouchInterest")
	if TI then
		print("TouchInterest is here :)")
	else
	print("TouchInterest is gone :(")
	error("No TouchInterest when firing 'Touched', a nil value")
	end
end)

There's only can make it when the code have contains .Touched code. There's no way to create them else they will auto-appear if you use .Touched code.

2 comments

0

Sorry for bad grammar lmao

0

My question is how exactly can I stop a tool from being equipped, I don't know how I can implement .Touched:Connect into my code unless I'm changing the parent of the tool to me, but the issue with that is the arm angle messes up, can I have more info on how to do this?

This discussion is preserved as it was. New answers, comments, and votes are closed.