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

What happened to Touch Interests?

Asked by 8 years ago

For my game it is where you click a tool and receive it. Where you click is in Workspace, but where you receive is in Server Storage. I tried everywhere and it won't give me a touch interest... should I try an

1Instance.new('Touch Interest')

script or no? Help!

In Workspace Tool: -Click Detector -Script -Name of item is called Tool

01--Configuration
02 
03Toolname = "Game" --Name of your tool, make sure tool is in lighting
04 
05--Dont mess with any of this
06function boop(Player)
07    if not Player.Backpack:FindFirstChild(Toolname) then
08        local Game = game.ServerStorage[Toolname]:clone()
09        Game.Parent = Player.Backpack
10    end
11end
12script.Parent.ClickDetector.MouseClick:connect(boop)

Some in Server Storage have a Touch Interest, but I can't duplicate or copy and paste it!

In Server Storage: -Tool named "Game" -Handle -No Scripts! Help Please! The Update isn't for a week or two so take your time. I am not expecting a new script unless that is the only way to get a Touch Interest in... please help!

0
You don't need to create one, if you care to see witch parts something is touched by,it's quite easy:'workspace.Part.Touched:connect(function(part) Thelegendofbrio13 0 — 6y

4 answers

Log in to vote
0
Answered by 8 years ago

If that script is a local script, it can't access things that are in the server storage, as it will appear as nil. So you have to put everything that you have into the replicated storage so clients and the server can both access it.

0
I know, but how do I get a Touch Interest Goldenkings11 -11 — 8y
Ad
Log in to vote
0
Answered by
RubenKan 3615 Moderation Voter Administrator Community Moderator
8 years ago
Edited 8 years ago

TouchInterest is something that gets generated by roblox when linking the .Touched event to a BasePart Instance. There is absolutely no reason to customly create one.

Log in to vote
0
Answered by 8 years ago

Here's an example:

1local part = Instance.new('Part')
2part.Anchored = true
3part.Parent = workspace
4part.Touched:connect(function()
5    print("Part was touched.")
6end)

(Code was taken from here)

Log in to vote
0
Answered by 6 years ago
1local function PrintPartTouched(Part)
2print('part was touched by'..Part)
3end
4workspace.Part.Touched:connect(PrintPartTouched)

Answer this question