My friend gave me this script, I started editing it as there was a lot missing. The issue is , it wont work. Anyone got suggestions?
Code:
local itemtopp = "KeyCard"
local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(player)
local mom = script:Clone()
mom.Parent = player.Character
local plr = game:GetService("Players"):GetPlayerFromCharacter(script.Parent)
local torso = script.Parent["Left Leg"]
local click = Instance.new("ClickDetector",torso)
click.MouseClick:Connect(function(player)
if player == plr then
--insert here
else
local finditem = plr.Backpack:FindFirstChild(itemtopp)
if finditem then
finditem.Parent = player.Backpack
else
--insert here
end
end
end)
end)
Thanks, if you can help would be great!