#Tool equip/unequip zone

2 messages · Page 1 of 1 (latest)

shadow rapids
#

Use this instead:

local equipZone = script.Parent
local tool = game.ServerStorage:WaitForChild("Tool")

equipZone.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
if not plr.Backpack:FindFirstChild(tool.Name) or plr.Character:FindFirstChild(tool.Name) then
local clonedTool = tool:Clone()
clonedTool.Parent = plr.Backpack
end
end
end)

equipZone.TouchEnded:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
local Tool = plr.Backpack:FindFirstChild(tool.Name) or plr.Character:FindFirstChild(tool.Name)
if Tool then
Tool:Destroy()
end
end
end)

hollow monolithBOT
#

studio** You are now Level 3! **studio