✓ Accepted answer
There are two issues to point out within your program. The parameter that is supplied containing the Instance on the opposing contact, is merely a body part if theoretically being touched by a Character Rig. You attempt to search the Players container for this Object which won't return a proper result. Lastly, you're trying to compare a number to the Object Humanoid, this won't compare properly, so the conditional won't run the code below. I assume you're trying to check their Health, that of which is a float, so we can evaluate:
####Note:
We can use the :GetPlayerFromCharacter() method of Players to uplink a Player Object with the Character derived from Hit.Parent.
local Players = game:GetService("Players")
local Tool = script.Parent
local Burger = Tool.Burger
Tool.Touched:Connect(function(Hit)
local Humanoid = Hit.Parent:FindFirstChildOfClass("Humanoid")
if (Humanoid and Humanoid.Health > 0) then
local Player = Players:GetPlayerFromCharacter(Hit.Parent)
local Backpack = Player:WaitForChild("Backpack")
Burger:Clone().Parent = Backpack
end
end)
It's best to maintain a practice of filtering for a Humanoid within a .Touched signal to ensure the chances of Hit.Parent correlating to a Character.
If this helps, don't forget to accept this answer!