When i try to clone a weapon from lighting into a players backpack with a class gui, the game crashes everytime. The weapon is made of 2 parts and 3 scripts so its not that complicated...
this is the script, but im 95% sure its not about the script:
player = script.Parent.Parent.Parent.Parent
weapon1 = game.Lighting.Shotgun
weapon2 = game.Lighting.Handgun
function giveWeps()
weapon1:clone().Parent = player.Backpack
wait(1) --this is to reduce the possibility of the game crashing.
weapon2:clone().Parent = player.Backpack
script.Parent.Parent:remove()
end
script.Parent.MouseButton1Down:connect(giveWeps)
--PLEASE! IM DESPERATE! D: |