Help with gun randomizer

Try using this.

local Players = game:GetService("Players")

Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		local Guns = game:GetService("ServerStorage").Guns:GetChildren()
		local randomGun = Guns[math.random(1, #Guns)]:Clone()
		randomGun.Parent = player.Backpack
		character:FindFirstChild("Humanoid"):EquipTool(randomGun)
	end)
end)

P.S please Instead of posting a picture of your code post the code and enclose it with ```