of     1   

oBlackKnighto
#59885586Tuesday, December 20, 2011 9:34 PM GMT

my friend made this for me and it says on the output that raygun doesnt exist. so how would u do this that if u dont have the gun in ur backpack then it clones it in there. thanks, blackknight function onTouch(part) local player = game.Players:GetPlayerFromCharacter(part.Parent) if player.Backpack.Raygun == nil then gun = game.Lighting.Raygun:clone() gun.Parent = player.Backpack end end script.Parent.Touched:connect(onTouch)
Spectrumw
#59885767Tuesday, December 20, 2011 9:37 PM GMT

function onTouch(part)   local player = game.Players:GetPlayerFromCharacter(part.Parent)   if not player then return end   if not player.Backpack:FindFirstChild('Raygun') then     gun = game.Lighting.Raygun:clone()     gun.Parent = player.Backpack   end end script.Parent.Touched:connect(onTouch)
oBlackKnighto
#59885833Tuesday, December 20, 2011 9:38 PM GMT

thank you spectrum :)

    of     1