So I have this code that when the dummy is killed as a chance to drop a item, but I couldn't figure out how to make it go directly into the players backpack, currently it just drops on the ground.
Script
local humanoid = script.Parent:FindFirstChild("Humanoid")
local rp = game:GetService("ReplicatedStorage")
local drop = rp.drop:FindFirstChild("Rusty Hammer")
local hr = script.Parent:FindFirstChild("HumanoidRootPart")
humanoid.Died:Connect(function()
local dropChance = math.random(1, 4)
if dropChance == 1 then
local clone = drop:Clone()
clone.Parent = workspace
local Handle = clone:FindFirstChild("Handle")
if Handle then
Handle.CFrame = hr.CFrame
end
end
end)

2 comments
clone.Parent = player.Backpack
My mistake