Argument line 7: StrikeBall not a valid member of backpack Also, this giver is to give a player that does not already have an the item and is on the same team as the color of the block.

local Giver = script.Parent
local Gear = game.ServerStorage.StrikeBall
local debounce = false
 
local function FindTool(player, tool)
    local Character = player.Character
    local HoldingTool = Character:FindFirstChild(tool)
    local BackpackTool = player.Backpack:FindFirstChild(tool)
 
    if HoldingTool ~= nil or BackpackTool ~= nil then
        return true
    end
end
 
Giver.Touched:connect(function(part)
    local Player  = game.Players:GetPlayerFromCharacter(part.Parent)
 
    if Player ~= nil and Player.TeamColor == Giver.BrickColor and debounce == false and Player:FindTool("StrikeBall") == nil then
	debounce = true
        Gear:Clone().Parent = Player.Backpack
    end
 
    wait(5)
    debounce = false
end)

2 comments

0

The main error I can see is on line 18; You only gave 'FindTool' one Argument, and not the required two Arguments!

0

Change 'Player:FindTool("StrikeBall")' to 'FindTool(Player,"StrikeBall")'