Click to Swap Tools
Script for Tool
Script for Tool
local tool = script.Parent
local main = tool.Main
local click = main.ClickDetector
local function swap_tools(player)
local currentTool = player.Backpack:FindFirstChildWhichIsA('Tool')
if currentTool then
currentTool.Handle.Name = 'Main'
currentTool.Parent = game.Workspace
currentTool.Main.Position = main.Position
end
main.Name = 'Handle'
tool.Parent = player.Backpack
end
click.MouseClick:Connect(swap_tools)