Help me please i only can this local GetServer = game:GetService("ServerStorage")
script.Parent.Touched:Connect(function(hit) local h = hit.Parent:findFirstChild("Humanoid") if h ~= nil then local player = game.Players:GetPlayerFromCharacter(h.Parent) if player then local tool = GetServer.ClassicSword:Clone(1) tool.Parent = player.Backpack script.Disabled = true wait(.2) script.Disabled = false end end
Warning, Scripting helpers is not a request site
Make a part and add a script
use this script
-- Detects when a part is touched script.Parent.Touched:Connect(function(hit) -- Checks if its a humanoid that touches it if hit.Parent:FindFirstChild("Humanoid") then -- Gets the backpack local backpack = game.Players:GetPlayerFromCharacter(hit.Parent):WaitForChild("Backpack") -- Looping through the backpack in search for something named ClassicSword for _, tool in pairs(backpack:GetChildren()) do if tool.Name == "ClassicSword" then -- Destroys the tool tool:Destroy() end end end end)