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

How to instance a TouchInterest?

Asked by 4 years ago

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

Log in to vote
0
Answered by 4 years ago

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

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? VoidKeyword 111 — 4y
0
You cannot clone TouchIntrest, or create it using a script. youtubemasterWOW 2741 — 4y
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 VoidKeyword 111 — 4y
0
It should already be impossible to grab. youtubemasterWOW 2741 — 4y
0
If you want to delete it, then disable the touch script and then delete it using a script. youtubemasterWOW 2741 — 4y
Ad
Log in to vote
0
Answered by
Xapelize 2658 Moderation Voter Community Moderator
4 years ago

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.

0
Sorry for bad grammar lmao Xapelize 2658 — 4y
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? VoidKeyword 111 — 4y

Answer this question