The following code is within a LocalScript under an ImageButton in a frame within GUI. The script gives you the gun when you click the image of it and it worked just fine when I tested it in Studio, but when I played the game itself, clicking the ImageButton did nothing.
script.Parent.MouseButton1Down:connect (function()
game.ServerStorage.AK47:Clone().Parent = game.Players.LocalPlayer.Backpack
end)
Here are two videos I took.
Studio testing: https://www.youtube.com/watch?v=QxBAA_8_cNk&feature=youtu.be In-game testing: https://www.youtube.com/watch?v=ojb4jtCFE8g&feature=youtu.be

4 comments
put the AK47 in ReplicatedStorage and change then to game.ReplicatedStorage.AK47 ect, (local scripts can't access serverstorage)
Replicated Storage is accessible by Client and server (local scripts, server scripts (server scripts are just normal scripts), Server Storage is only accessible by server scripts (not local scripts)
and use PhotonLightnings adjustment
Is Fe on?