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 7 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

Instance.new('Touch Interest')

script or no? Help!

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

--Configuration

Toolname = "Game" --Name of your tool, make sure tool is in lighting

--Dont mess with any of this
function boop(Player)
    if not Player.Backpack:FindFirstChild(Toolname) then
        local Game = game.ServerStorage[Toolname]:clone()
        Game.Parent = Player.Backpack
    end
end
script.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 7 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 — 7y
Ad
Log in to vote
0
Answered by
RubenKan 3615 Moderation Voter Administrator Community Moderator
7 years ago
Edited 7 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 7 years ago

Here's an example:

local part = Instance.new('Part')
part.Anchored = true
part.Parent = workspace
part.Touched:connect(function()
    print("Part was touched.")
end)

(Code was taken from here)

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

Answer this question