local Muffin = script.Parent
local ClickDetector = Muffin.Handle.ClickDetector
if Muffin.Handle:FindFirstChild("TouchInterest") then
Muffin.Handle.TouchInterest = false
end
ClickDetector.MouseClick:Connect(function(player)
local ToolClone = Muffin:Clone()
local Handle = ToolClone.Handle
ToolClone.Parent = player.Backpack
Handle.ClickDetector:Destroy()
ToolClone.inventoryScript:Destroy()
Handle.Anchored = false
When I do this, only the part named handle goes to the players inv
Normally people use meshes if they want more then one part as the tool. Have you tried making a mesh for the muffin? It’s fine if you don’t know how to, as I don’t know how to either lol. I just use a single part instead of two or three.
Then created a part, put a click detection script it, so it would give the player the tool you want it to. Make sure the tool will be a parent of a correct section.
I’d try something like making a copy of it and placing it somewhere, and make sure the script you posted is one server script.
local Muffin = script.Parent
local Handle = script.Parent:WaitForChild("Handle")
local ClickDetector = Handle:FindFirstChild("ClickDetector")
if Handle:FindFirstChild("TouchInterest") then
Handle.TouchInterest = false
end
ClickDetector.MouseClick:Connect(function(Player)
local Name = "Muffin"
local Clone = game:GetService("ServerStorage"):FindFirstChild(Name)
if Clone then
local v1 = Clone:Clone()
v1.Parent = Player:FindFirstChild("Backpack")
for i,v in pairs(v1:GetChildren()) do
if v.Handle.ClickDetector then
v.Handle.ClickDetector:Destroy()
v.inventoryScript:Destroy()
v.Handle.Anchored = false
end
end
end
end)
Maybe you can try it. Not sure if I got what you wanted.