Here's the script.
script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChildWhichIsA("Humanoid") ~= nil then
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player.Backpack.LaserGun == nil then
local gunClone = gun:Clone()
gunClone.Parent = player.Backpack
end
end
end)
The error is ("LaserGun is not a valid member of Backpack") Which is exactly what I want so I can give the player a gun, but it's still not given.

1 comment
Thanks!