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!
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.
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.
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)
local function PrintPartTouched(Part) print('part was touched by'..Part) end workspace.Part.Touched:connect(PrintPartTouched)