Tool Clone
local Prox = yourproximityprompt
local Tool = yourtool
Prox.Triggered:Connect(function(player)
if player.Backpack:FindFirstChild("Tool") then -- change "tool" to your tool name
return true
elseif player.Character:FindFirstChild("Tool") then -- change "tool" to your tool name
return true
else
Tool:Clone().Parent = player.Backpack
end
end)
Try deleting the else on line 11. Also, I would suggest removing lines 6-8. Check if the player has the tool equipped by changing line 9 to if x.Character:FindFirstChild(toolname) and x.Backpack:FindFirstChild(toolname) == nil then
local Prox = yourproximityprompt
local Tool = yourtool
Prox.Triggered:Connect(function(player)
if player.Backpack:FindFirstChild("Tool") then -- change "tool" to your tool name
return true
elseif player.Character:FindFirstChild("Tool") then -- change "tool" to your tool name
return true
else
Tool:Clone().Parent = player.Backpack
end
end)